Jump to content

Recommended Posts

Hello, 

 

Sorry, I'm not a pro in english and lua coding, I searched a lot on forum/google/steam/DST source-code some informations but I don't understand everything :

I (try) to write a mod who modify the gen-world code (tasks/rooms more customizable and random).

 

Can it's possible to write a custom "worldgen_main.lua" in my mod folder and use it ? (if yes how ?)

    (ex : After many try, if i try to put a custom "mymod/script/worldgen_main.lua",  the game don't want use it)

    (PS : "LevelPreInitAny API" don't help me for all what i want do)

 

If it's not possible i can try to push my gen-world code in a custom forest_map.lua but its a crap "hook" solution i think.

 

Thank you !

Edited by Rokin

Uuuum I did not understand..  :indecisiveness:
 
 
I have my mod :

../DST/mods/<mysupermod>/

I have written some code in :

- ../DST/mods/<mysupermod>/modmain.lua- ../DST/mods/<mysupermod>/modworldgenmain.lua

If i want, in this example, modify "rooms.lua" (in "hardcode", without use any api)
i can put a copy of this file in my mod directory and modify it (the game read that copy if the mod is enable)

../DST/data/scripts/map/rooms.lua(copy to)../DST/mods/<mysupermod>/scripts/map/rooms.lua

Now if i want modify worldgen_main.lua

../DST/data/scripts/worldgen_main.lua

i can try to put a copy in :

../DST/mods/<mysupermod>/scripts/worldgen_main.lua

But the game not use it. (If y have a little understand, the game call worldgen_main.lua after mods loading.)
 
 
 
 

@Rokin, it's worldgenmain.lua not worldgen_main.lua. 

 
so what i must do ?!

../DST/mods/<mysupermod>/scripts/worldgenmain.lua../DST/mods/<mysupermod>/data/scripts/worldgenmain.lua

I have try but it's change nothing and i found 0 threads who speak from a file named worldgenmain.lua  :spidercowers:
(https://www.google.fr/search?q=worldgenmain.lua&oq=worldgenmain.lua&aqs=chrome..69i57j69i59.327j0j7&sourceid=chrome&es_sm=122&ie=UTF-8)

 

 

 

 

 

I have copy my topic in the good forum :

http://forums.kleientertainment.com/topic/56012-custom-worldgen-mainlua-in-mod/?p=652950

sorry sorry

Edited by Rokin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...