Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
What window is this?

I'm trying to edit the "Travelling to Uxkhal's port" part, but searching the ms for "Travelling to", only brings up a few dialogues with lords.

2rpy9gl.jpg
 
Fire_and_Blood said:
What window is this?

I'm trying to edit the "Travelling to Uxkhal's port" part, but searching the ms for "Travelling to", only brings up a few dialogues with lords.

2rpy9gl.jpg
Line indicating current party activity is generated by the engine using templates from languages/en/ui.csv file:

Code:
ui_waiting|Waiting.
ui_travelling_to|Travelling to 
ui_following|Following 
ui_accompanying|Accompanying 
ui_running_from|Running from 
ui_patrolling|Patrolling
ui_patrolling_around|Patrolling around 
ui_holding|Holding
ui_travelling|Travelling
ui_fighting_against|Fighting against

This unfortunately means you cannot control them on per-party basis.
 
Ah, that is unfortunate.

Ideally, the line would  have read: "Travelling to {target_center} via {target_port}", as my script temporarily overrides the parties {target_center} with {target_port} and it would have been nice to know the parties final destination.

Edit:
Is there a way to figure out, when this template gets called? As that would allow me to temporarily replace {target_center} with the parties final destination stored in slot_party_destination and then replace {target_center} again with {target_port}, as soon as the mouse leaves that template window.
 
As far as I know, it's impossible. Patch 1.161 promises mouse_get_world_projection operation, if it works on global map then maybe some dirty hack can be implemented by detecting when mouse cursor is close to a moving ship party and renaming it's destination before cursor actually reaches it.
 
The_dragon said:
Make sure you added them after the "mission_templates = [" line. (and before the closing bracket corresponding to the mission_templates starting one; that is at the end of the file (usually))
I did, still saying "unexpected indent" when i compile.

But when i move the last "]" with spacebar
Code:
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
#-#-#-#Hunting Mod end#-#-#-#
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
  
 ]<----THIS
it says just unexpected indent for the beginning line of the next sript so it has something to do with the ]
 
I have a script that assigned particular position to a player and teleports him to it based on which scene prop he used, and this position has defined x, y, and z coordinates. Those coordinates were obtained when I was editing a map while hosting a local server, and the it really does teleport me to the exact position I specified. I should also mention that they have a set fixed point multiplier, because tping you to a position doesn't work without it.

However, I tried doing this in a dedicated server, and it simply teleported me to some weird spot on the map, a border area, in fact, all scene props lead to the same area, which is really confusing. So, my question is, how do I convert coordinates in a local server to a dedicated one?

One alternative I tried was assigning a scene prop to be defined as pos1, and then through this teleporting the player to the scene prop, but for some reason it doesn't do so and messes up, getting the wrong location.
 
I made a new map and used the Module System to make the parties.txt, troops.txt and factions.txt (with the right IDs and all), now my mod works, but the cities do not belong to the right faction,
even though the files have the right "fac_kingdom_X" value.
How can I make them belong to the right faction?
 
There is a script "game_start", which assigns castles and towns to certain factions. It does overwrite the faction, that is set in module_parties.

You can search for the following line and set, which faction each settlement should belong to:
  (call_script, "script_give_center_to_faction_aux", "p_town_1", "fac_kingdom_4"),

 
Thanks, now it works.

The main towns still belong to random lordlings but that's because I must give each lord its own seat etc. etc.

Thanks for the help  :grin:

 
Does anyone know, why using the following turns the windmill invisible? It's visible, before setting the new position.

(ti_after_mission_start, 0,0, [], [
(scene_prop_get_instance, ":scene_prop", "spr_windmill", 1),
(prop_instance_set_position, ":scene_prop", pos36),
]),
 
Yes. Pos36 is calculated by a script, which gets called before moving the windmill.

In edit mode, the windmill is listed as a scene_prop and I can double click on it, to get to it's position. It just is not visible.
 
Also tried this to no avail: (Inside the mission template)

      (0, 0, ti_once,[],
      [
(position_set_x, pos36, 5000),
(position_set_y, pos36, 5000),
(position_set_z_to_ground_level, pos36),
(scene_prop_get_instance, ":scene_prop", "spr_windmill", 1),
(prop_instance_set_position, ":scene_prop", pos36),
(prop_instance_animate_to_position, ":scene_prop", pos36, 1),
]),
 
You need to set the fixed point multiplier. If it would be 1, then that '5000' value will be way outside the scene.
Could you tell us what you want to achieve? Are you trying to make something like upgradeable village?
 
Status
Not open for further replies.
Back
Top Bottom