Raising troop skill on server side

Users who are viewing this thread

Muzzle C

Sergeant Knight
Greetings,

I'm making a native, server side mod.
My current problem is to make agents have a specific skills, so that everyone can pick up a better bows and such.

The following code works locally, but not when used on the server..
If someone could point out what i'm doing wrong, i'd appreciate it.



Code:
raise_skill_on_spawn_agent = (ti_on_agent_spawn, 0, 0, [(multiplayer_is_server),],
       [
        (store_trigger_param_1,":agent_no"),
		(agent_is_human,":agent_no"),
		(neg|agent_is_non_player,":agent_no"),
		(agent_get_player_id,":player_id",":agent_no"),
		(player_get_troop_id,":troop_id",":player_id"), 
		
		(store_skill_level ,":power_draw",":troop_id","skl_power_draw"),
		(try_begin),
			(le,":power_draw",5), 
			(troop_raise_skill,":troop_id","skl_power_throw",2),
			(troop_raise_skill,":troop_id","skl_riding",4),
			(troop_raise_skill,":troop_id","skl_power_draw",7),
			(troop_raise_proficiency_linear,":troop_id",wpt_crossbow,120),
			(troop_raise_proficiency_linear,":troop_id",wpt_throwing,30),
			(troop_raise_proficiency_linear,":troop_id",wpt_archery, 110),
			(troop_raise_proficiency_linear,":troop_id",wpt_firearm, 100),
		(try_end),
         ])
 
You can't do such thing server side only. Troops's skills/stats are not shared between server and client. To do such thing you will need a client mod too.
 
technically, you can do it the way you are doing right now, but the game will look very strange on the client. if you change str/iron flesh, the health bars will display a health bigger than the normal one and also, you won't be able to pick-up items/mount horses unless the troop has the required stats clientside
 
Back
Top Bottom