Jinnai said:Use the same function I mentioned before, but check if it's night time. If it is night, increase the speed by enough to offset the normal game night time decrease. Double I think? (ie, 200) Can't remember exactly.
("game_get_party_speed_multiplier",
[
(store_script_param, ":party_no", 1),
(try_begin),
(is_currently_night),
(set_trigger_result, 200),
(else_try),
(set_trigger_result, 100),
(try_end),
]),
# script_process_alarms
# Input: none
# Output: none
#called from triggers
("process_alarms",
[(try_for_range, ":center_no", centers_begin, centers_end),
(party_set_slot, ":center_no", slot_center_last_spotted_enemy, -1),
(try_end),
(assign, ":spotting_range", 2),
(try_begin),
(is_currently_night),
(assign, ":spotting_range", 1),
(try_end),
(try_begin),
MartinF said:Hey guys,
I'm using this script to tweak map speeds based on certain unit types (I hate uncatchable bandit parties!!)
Anyway I've gotten it all to work but I want to expand the model a bit. Does anyone know exactly how map speed is determined?
For instance, I know that troop numbers affect speed, but is there a function that governs it? Or are there simply too many variables to say anything concrete about that?
The idea of big armies travelling slower in a medieval mod is fine, but in space the speed would be determined by the type of startship, not the amount of troops it carries. Same with cargo, so I'd like to negate these speed decreases at least somewhat accurately. Next step could be to limit party size not just by leadership but also by ship size, but for now I'd like to get this working.
Thanks!
Morrigan86 said:Yeah, unfortunately the cheat cancels out achievements. I was hoping to find something that would allow maybe to increase the bonus given by pathfinding (instead of 3% to 8%-10%.) Oh well... Thanks for the fast reply anyway.
## #script_game_get_party_speed_multiplier
## # This script is called from the game engine when a skill's modifiers are needed
## # INPUT: arg1 = party_no
## # OUTPUT: trigger_result = multiplier (scaled by 100, meaning that giving 100 as the trigger result does not change the party speed)
## ("game_get_party_speed_multiplier",
## [
## (store_script_param, ":party_no", 1),
## (set_trigger_result, 100),
## ]),
Swyter said:Morrigan86 said:Yeah, unfortunately the cheat cancels out achievements. I was hoping to find something that would allow maybe to increase the bonus given by pathfinding (instead of 3% to 8%-10%.) Oh well... Thanks for the fast reply anyway.
You'd be surprised. There's a hardcoded script, commented out by default, which does exactly that:
Code:## #script_game_get_party_speed_multiplier ## # This script is called from the game engine when a skill's modifiers are needed ## # INPUT: arg1 = party_no ## # OUTPUT: trigger_result = multiplier (scaled by 100, meaning that giving 100 as the trigger result does not change the party speed) ## ("game_get_party_speed_multiplier", ## [ ## (store_script_param, ":party_no", 1), ## (set_trigger_result, 100), ## ]),
There's no need of enabling cheats, tidy and nice. This is called every time a party has to move.
Do a conditional checking for the main party and any other global variables you want to affect the
result and set the return value in % as shown in the example.
EDIT: Nevermind, Hokie posted the very same thing in 2009 here, I learned this from working on SWC. The irony is strong in this one.
In that case you would need to reactivate the commented out script script_game_get_party_speed_multiplier (mentioned twice above) and work in checks for every party and apply a penalty or speed bonus depending on the pathfinding skill. The pathfinding skill itself is hardcoded iirc, so there is no easy way to increase the bonus given there.Hello ,
I know the subject is old, but that's exactly what I'm looking for, except that I didn't understand exactly what to do
I speak to increase the bonus given by pathfinding
Thank you