Moving To Discord: https://discord.gg/UmXNvjq
Hello everyone, due to bugs with the forum software that I do not have time to care about, I am going to be shutting down these forums and moving my discussions to Discord instead. I will eventually keep releases here on the site but the forums will be removed sooner or later. I encourage people to join my personal Discord if you have questions, if you are looking for any of my projects, etc.
Registration Code (Part 1): w%kQ6
Registration Code (Part 2): b<#$1[*(cw~
In order to register on this forum, you must use the codes above. Combine them into one code (copy paste).
Hello everyone, due to bugs with the forum software that I do not have time to care about, I am going to be shutting down these forums and moving my discussions to Discord instead. I will eventually keep releases here on the site but the forums will be removed sooner or later. I encourage people to join my personal Discord if you have questions, if you are looking for any of my projects, etc.
Registration Code (Part 1): w%kQ6
Registration Code (Part 2): b<#$1[*(cw~
In order to register on this forum, you must use the codes above. Combine them into one code (copy paste).
A Guide To Grim Dawn's Lua Engine
-
- Posts: 2
- Joined: Sun Sep 06, 2015 7:55 pm
Re: A Guide To Grim Dawn's Lua Engine
Do you know of an easy way to give players faction? My current thinking was giving them a bonus reputation item, then giving/completing bounties through a script (I have no idea how to find the quest id numbers though), but is there a better way?
- atom0s
- Site Admin
- Posts: 450
- Joined: Sun Jan 04, 2015 11:23 pm
- Location: 127.0.0.1
- Contact:
Re: A Guide To Grim Dawn's Lua Engine
The last time I dumped the Lua state there was no exposed Lua function to give a player faction points. So not too sure about doing it in Lua. The game has updated several times since I've touched it though so it may be there now.
Derp~
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
-
- Posts: 2
- Joined: Sun Sep 06, 2015 7:55 pm
Re: A Guide To Grim Dawn's Lua Engine
I just checked, and there doesn't seem to be one yet, *sadface*
-
- Posts: 1
- Joined: Mon Dec 28, 2015 7:05 pm
Re: A Guide To Grim Dawn's Lua Engine
So, like lots of people, I've been shuffling quests.gdd back and forward to repeatedly turn in the final quest and claim the free legendary - back to menu, back in, repeat etc.
I prefer this because it generates proper items unlike the 'baseline' ones through lua, so my question is as follows:
Is it possible to *uncomplete* a quest through lua? So I can simply hand in, hit the script which unflags the quest and rewinds the stage to 'ready for turn in' and repeat until I get bored?
I prefer this because it generates proper items unlike the 'baseline' ones through lua, so my question is as follows:
Is it possible to *uncomplete* a quest through lua? So I can simply hand in, hit the script which unflags the quest and rewinds the stage to 'ready for turn in' and repeat until I get bored?
- atom0s
- Site Admin
- Posts: 450
- Joined: Sun Jan 04, 2015 11:23 pm
- Location: 127.0.0.1
- Contact:
Re: A Guide To Grim Dawn's Lua Engine
You can try making use of the following:
GrantQuest
CompleteQuest
These are both part of the Player table. I have not tried to do anything with the quest stuff so I'm not sure what limitations it has. I don't really touch Grim Dawn anymore since I do not find the game fun at all.
GrantQuest
CompleteQuest
These are both part of the Player table. I have not tried to do anything with the quest stuff so I'm not sure what limitations it has. I don't really touch Grim Dawn anymore since I do not find the game fun at all.
Derp~
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
-
- Posts: 2
- Joined: Fri Feb 26, 2016 7:04 am
Re: A Guide To Grim Dawn's Lua Engine
Is there any comfortabler way of getting specific sets of entities?
This prints me out the pointers of all chests that have been loaded.
Which means, if I wanted to know if there was a chest in proximity, I would need to keep re-evaluating a massive amount of memory and calculate the distance for each entity located.
Of course I could optimize it by only doing the first big chunk, then using my own list until a new area, but that seems excessive to me.
There's also the issue of those objects never being destroyed, they keep populating with each new area and even if you exit to the mainmenu.
Creating new entities is easier, because I already have the object reference. eg.
But I'd prefer to use already existing elements. Also, how do I check the userdata contents of the dbr files during runtime? Like reading the HP of a monster.
Code: Select all
for x = 0, 500000 do
local n = Chest.Get(x);
if(n ~= nil)then
print(string.format("%d %s",Chest.GetId(n), Chest.GetName(n)));
end
end
Which means, if I wanted to know if there was a chest in proximity, I would need to keep re-evaluating a massive amount of memory and calculate the distance for each entity located.
Of course I could optimize it by only doing the first big chunk, then using my own list until a new area, but that seems excessive to me.
There's also the issue of those objects never being destroyed, they keep populating with each new area and even if you exit to the mainmenu.
Creating new entities is easier, because I already have the object reference. eg.
Code: Select all
local createchest = Chest.Create("records/items/lootchests/a01_chestcorpse02.dbr");
local newchest_id = Chest.GetId(createchest);
Chest.SetCoords(Chest.Get(newchest_id), Game.GetLocalPlayer():GetCoords());
-
- Posts: 2
- Joined: Thu Mar 03, 2016 7:05 pm
Re: A Guide To Grim Dawn's Lua Engine
Hello atomos, i come to your forum because may be you know how i can move character via lua scripts http://prntscr.com/ch8212


- atom0s
- Site Admin
- Posts: 450
- Joined: Sun Jan 04, 2015 11:23 pm
- Location: 127.0.0.1
- Contact:
Re: A Guide To Grim Dawn's Lua Engine
If I recall, there is no way to create a WorldVec object from Lua since the object in Lua is just a table. I'm not certain how to go about calling that without implementing some custom code to expose the games WorldVec3 object to Lua.
Derp~
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
Who is online
Users browsing this forum: No registered users and 0 guests