Page 1 of 1
Desert Life [desert_life]

Posted:
Fri Dec 16, 2016 17:05
by Nathan.S
This mod adds a little more life to the otherwise relatively plain deserts. Currently it includes a prickly pear and barrel cacti, but I do plan on adding more flora as I have time.
If you are playing with tenplus1's mob api you will also see ostriches popping up in the deserts. Again, I plan to add more animals as I get time.

yes, I know this isn't a desert, I manually placed the cacti and ostriches, as after flying around for 15 minutes I couldn't find a desert.
Browse source on Github:
https://github.com/NathanSalapat/desert_lifeDownload:
https://github.com/NathanSalapat/desert ... master.zipLicense on models and graphics CC by SA 4
Re: Desert Life [desert_life]

Posted:
Sat Dec 17, 2016 17:03
by azekill_DIABLO
I love meshes!
Re: Desert Life [desert_life]

Posted:
Sat Dec 24, 2016 01:20
by trainwrecktony
nice mod been using it for a while before ostrich added. Even before ostrich had to strip some code to avoid crash.
Here is crash i get with unedited code
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
016-12-23 19:51:48: ERROR[Main]: ServerError: Lua: Runtime error from mod 'desert_life' in callback LuaABM::trigger(): C:\test\bin\..\games\twt\mods\desert_life/functions.lua:35: attempt to index local 'under_name' (a nil value)
2016-12-23 19:51:48: ERROR[Main]: stack traceback:
2016-12-23 19:51:48: ERROR[Main]: C:\test\bin\..\games\twt\mods\desert_life/functions.lua:35: in function 'spread'
2016-12-23 19:51:48: ERROR[Main]: C:\test\bin\..\games\twt\mods\desert_life/prickly_pear.lua:176: in function <C:\test\bin\..\games\twt\mods\desert_life/prickly_pear.lua:155>
features i'd like to see:
reduced spread
pads can only be dug using shears from mobs mod, support if vines shears or multitest shears used too
barrel cacti only dug by axe
grinding/dye crafts
cactus fruit can see old cactus mod
viewtopic.php?id=4311
Re: Desert Life [desert_life]

Posted:
Sat Dec 24, 2016 01:44
by Nathan.S
Hmmm, that error doesn't make sense, it would appear as if a cacti is trying to spread into a location where there is no node. I added some code that should catch the problem, and just print an error message to the debug.txt I ran a test and did see that message popping up a few times, will have to try to figure out what it causing it.
By reduced spread do you mean slower spreading, or that they only spread if there is less than a certain amount in the area?
I could probably add recipes to turn the cacti into dye, should be easy to do.
I'm not entirely pleased with how the pad harvesting works right now anyway, so I do need to work on that. Not sure if I can make it need the tools, as I think the tools would need to have the code, but will look into it.
I thought about adding fruit to the prickly pear, but that would require new meshes, and a bunch of new models, which wouldn't be hard to do, but I didn't feel like it was worth it. I do have support added for mymonths, and they flower during certain parts of the year, I could make it so if they are harvested while flowering you have a chance to get cacti fruit.
Re: Desert Life [desert_life]

Posted:
Sat Dec 24, 2016 02:20
by trainwrecktony
Reduce spread like less in certain area. I like the extra desert foliage but think should still be sparse like dry shrub distribution
Re: Desert Life [desert_life]

Posted:
Sat Dec 24, 2016 02:33
by TheReaperKing
I love cool looking terrain mods like this that give more LIFE to the world! Great job Nathan!
Re: Desert Life [desert_life]

Posted:
Sat Dec 24, 2016 02:44
by Nathan.S
I thought that is what you meant trainwrecktony, so I started work on a change to the spread function that will keep them from being so dense, should have more open areas now, well once I update. I got that error you mentioned a few times, but for the life of me can't figure out what is causing it, trying to debug it now.
Re: Desert Life [desert_life]

Posted:
Sat Dec 24, 2016 15:56
by Nathan.S
Okay, so still no idea why that error exists, but I added some code to catch the error so no more crashes. :)
As mentioned previously I added code to keep the plants from spreading so much, the attached picture is an area that had some cacti naturally spawn, and they were spreading for about twenty minutes, with the ABM rate and chance set to 1 rather than 40 and 30 so it was WAY faster than you'll ever see in game. Seems to work pretty well in my opinion, still paths that can be walked through. I'll work on the harvesting in the next update.
Code has been pushed to Git so pull/clone and have fun!
Re: Desert Life [desert_life]

Posted:
Mon Dec 26, 2016 17:32
by Nathan.S
Pushed another update, not too much of a change to game play, the barrel cacti now spread a two nodes away from the parent plant, so you won't get solid walls of them, well shouldn't anyway.
On the backend I made the plant_spread function a little more customizable, plants can now define how far the children should be placed from their parent, and they can vary how much air is needed for the child to be placed. This is useful if you want to allow a plant to completely take over an area, or if you want it to be more sparse on the landscape.
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 12:22
by ManElevation
nice new models!
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 16:20
by Andrey01
Nathan, you should add camels, rats and snakes.I think these animals are better suits for deserts
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 19:07
by Nathan.S
Rats already exist in the mobs_animals mod, but camels and snakes are good ideas, will see about adding those in the next few weeks.
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 20:02
by echosa
Warnings in debug.txt:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
2017-01-01 13:58:20: WARNING[Main]: Undeclared global variable "desert_life_bloom" accessed at ...netest/mods/desert_life/prickly_pear.lua:77
2017-01-01 13:58:20: WARNING[Main]: Undeclared global variable "desert_life_bloom" accessed at ...netest/mods/desert_life/prickly_pear.lua:181
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 20:13
by mahmutelmas06
There is a snake in nssm as i remember.
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 20:40
by Nathan.S
Fixed those errors echosa, feel free to pull or download a fresh copy to resolve them.
mahumutelmas06 nssm does have a giant sandworm, not sure if there is a normal viper type snake that isn't giant.
Re: Desert Life [desert_life]

Posted:
Sun Jan 01, 2017 21:22
by echosa
Thanks!