A Couple of Questions

Users who are viewing this thread

glenn500

Sergeant at Arms
Hello Vorrne a question


Question 1
When a faction captures a castle is it possible to replace the Normal Capture script which instantly swaps over the castle to the other faction to a choice menu for the Capturing Faction lord to make a choice on what to do with the castle Exchange,Capture,Vassalize Faction(If they only have 1 castle), Extermanation(Disband Faction with 1 Castle to Commoners)


Question 2

Like ships is it possible to store the amount of carts in a slot to reset them to their original spawn position
 
glenn500 said:
When a faction captures a castle is it possible to replace the Normal Capture script which instantly swaps over the castle to the other faction to a choice menu for the Capturing Faction lord to make a choice on what to do with the castle Exchange,Capture,Vassalize Faction(If they only have 1 castle), Extermanation(Disband Faction with 1 Castle to Commoners)
Most of that is possible, but would require a lot of scripting and presentation work to implement the features: PW does not have any mechanism to recognise "vassal" factions. It is also impossible for "commoners" to own a castle: the concept is a contradiction in terms, if you understand the meaning of the word in PW (a loose category of unaffiliated, unknown, individual strangers). The relevant scripts expect that every castle is always owned by a "proper" player controlled faction.
glenn500 said:
Like ships is it possible to store the amount of carts in a slot to reset them to their original spawn position
It is possible, but I would suggest to be careful: if a player is standing in the starting position of a cart when it is reset, the player could be killed by launching into the air or glitched into a nearby scene prop.
 
Alright thanks for the info is there a way to get the amount of castles owned by a faction and if so to also check which Castle ID's are owned by the faction
 
glenn500 said:
Alright thanks for the info is there a way to get the amount of castles owned by a faction and if so to also check which Castle ID's are owned by the faction

I have worked on this kind of things earlier without using castle IDs itself but going through faction ID.
Since when you press TAB you can see owned castles for each factions, you must be able to get the variable for owner castle.

You may want to begin looking in the presentation.py for castle varible, I'd bet you can get it with a constant.
 
glenn500 said:
Alright thanks for the info is there a way to get the amount of castles owned by a faction and if so to also check which Castle ID's are owned by the faction
Castle attributes are stored in the dummy troop "mission_data", with the owning faction of each castle stored in slots from slot_mission_data_castle_owner_faction_begin to slot_mission_data_castle_owner_faction_end (0 - 7 representing castles numbered 1 - :cool:. To count the number of castles owned by a faction, just loop over those slots: you could find an example in presentation "respawn_time_counter". Remember to check whether the castle is actually active in the scene, using script "cf_castle_is_active" or checking the corresponding slot starting from slot_mission_data_castle_is_active_begin.
 
Back
Top Bottom