fodev.net
		FOnline Development => General Discussion => Topic started by: muhoooool on June 13, 2012, 05:27:15 pm
		
			
			- 
				Hello all,
 So my thoughts on this and work i have done so far;
 - cr.timeout seem to be the global time out - for books skills etc ( if this value is >0 you cant craft )
 - _defines file seems to have several time outs defined ( lockpick, doctor, skill )
 - fixboy.fos is just about workbenches and machinery [?] ( How do u use this script ? )
 - There are several timeout vars ( Changing them to max value 1 ) seems to set the craft timeout to max 1 minute. ( Worked one time, then didnt work again [ maybe need to reload client scripts, or delete clients - server/save ]
 
 thoughts on this would be great.
 
 The problem is I cant find for sure which value to change;
 - SET CRAFT TIMEOUT FOR INDIVIDUAL ITEMS?
 
 
 Thanks
 
 
- 
				You probably need a small workaround for that in main.fos
 
 for example, to remove the cooldown completely, put this inside void items_crafted:
 
     uint[] param(1);
 param[0] = crafter.Id;
 CreateTimeEvent(__FullSecond+REAL_SECOND(0), "_CraftingTimeOutPatch", param, false);
 and this outside of void items_crafted:
 
 uint _CraftingTimeOutPatch(uint[]@ Id)
 {
 Critter@ crafter = GetCritter(Id[0]);
 crafter.TimeoutBase[TO_SK_REPAIR] = __FullSecond+REAL_SECOND(0);
 crafter.TimeoutBase[TO_SK_SCIENCE] = __FullSecond+REAL_SECOND(0);
 return 0;
 }
 Took it from Xenom long ago.
 To set craft timeout you'd need to identify the type of item crafted and set appropriate cd.
 
 hope it helps, cheers
- 
				Craft timeouts actually hardcoded in engine but you can exclude them from engine preccessing
 in fix_boy.fos
 change
 #define FIX_SUCCESS              ( FIXBOY_DEFAULT )
 to
 #define FIX_SUCCESS                (FIXBOY_DEFAULT^FIXBOY_CHECK_TIMEOUT^FIXBOY_SET_TIMEOUT)
 after this craft timeouts and checking for timeouts will be disabled.
 So you must proccess timeouts by yourself, for example:
 cr.TimeoutBase[TO_SK_REPAIR] =  REAL_MINUTE (1);
 cr.TimeoutBase[TO_SK_SCIENCE] = REAL_MINUTE (1);
- 
				Damn!
 This is quite amazing stuff here guys,very interesting!!
 Thanks a lot
- 
				ty based kilgore
 
 
 You probably need a small workaround for that in main.fos
 
 for example, to remove the cooldown completely, put this inside void items_crafted:
 
     uint[] param(1);
 param[0] = crafter.Id;
 CreateTimeEvent(__FullSecond+REAL_SECOND(0), "_CraftingTimeOutPatch", param, false);
 and this outside of void items_crafted:
 
 uint _CraftingTimeOutPatch(uint[]@ Id)
 {
 Critter@ crafter = GetCritter(Id[0]);
 crafter.TimeoutBase[TO_SK_REPAIR] = __FullSecond+REAL_SECOND(0);
 crafter.TimeoutBase[TO_SK_SCIENCE] = __FullSecond+REAL_SECOND(0);
 return 0;
 }
 Took it from Xenom long ago.
 To set craft timeout you'd need to identify the type of item crafted and set appropriate cd.
 
 hope it helps, cheers
 
 
- 
				nice