SphereCommunity
t_crops not growing - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: t_crops not growing (/Thread-t-crops-not-growing)



t_crops not growing - Myrdin - 07-06-2013 12:09 AM

i downloaded the new "pre-release", set it up, works fine... but somehow the t_crops are not growing. reap the fruit of full grown plants is possible, they properly reset to first grow state, but then they won't grow, from none of the growing stages.
I doublechecked the scripts, everything seems to be fine (community script pack)
investigation shows, timer=-1 or timer = 0
is this a sphere bug or is this pushed out of hardcoded to scripting? and if so, is there a script with default behaviour?

besides: i tried cotton, wheat, grapevines flax,... none worked properly


RE: t_crops not growing - darksun84 - 07-06-2013 12:31 AM

Looks like that the timer in t_crop items is stored in :


MORE1 = Time in seconds before this item will grow to the next stage (this overrides the default server defined number)



RE: t_crops not growing - Myrdin - 07-06-2013 05:21 AM

I tried setting more1 to different numbers, doesn't work. besides, timer is not 0 or -1 from the beginning. seems like somehow @timer isn't called or as if there is no function to update the item to the next stage, resulting in timer =0 or timer = -1 and nothing more happens. same result after manually setting timer to 1 (which results in timer around 400 (ie 385 or 426)). the timer counts down, nothing happens, timer is 0 or -1.
tdata2 is 0, tdata3 is the next growing stage and tdata1 is the first growing stage, which should appear after harvesting the fruit. (last growing stage has tdata2 set to the fruit id and tdata3 set to 0)

everything seems to be as it should, but somhow the items just stuck.
btw, i also tried with different attr values, to enshure its not a conflict with nodecay, nevermoveable, statics or other set attr.

?could it be some conflict with the ini settings? will try thisone next if no one has an idea


RE: t_crops not growing - RanXerox - 07-06-2013 06:03 AM

Try this:

Code:
[TYPEDEF t_crops]
ON=@Timer
   IF !(<ATTR> & attr_invis)
      IF (<TDATA2> != 0) && (<TDATA2> != 0ffffffff)
         ID=<TDATA2>
      ENDIF
      UPDATE
   ELSE
      RETURN 0
   ENDIF



RE: t_crops not growing - Myrdin - 07-06-2013 07:21 PM

thx, with a little modification it works.
Code:
[TYPEDEF t_crops]
ON=@Timer
   IF !(<ATTR> & attr_invis)
      IF (<TDATA2> != 0) && (<TDATA2> != 0ffffffff)
         ID=<TDATA2>
      ENDIF
      UPDATE
   ENDIF
   RETURN 0
(return 0 enshures the timer is reset, could also be done explicit...)

while testing i realised:
regen3 does not influence how fast crops will grow,(like i thaught it would) but how fast food is consumed!
therefor setting regen3 to 1 results in characters consuming 1 food every second!!!!!!! -> you are hungry... you are starving...
is this the way it's ment to be? and where is the ini value for setting the growing time? (I didn't find anyShock)