How to set a specific town as condition?

Users who are viewing this thread

My mod is based on 2 continents, you always start on the same one no matter what. (I haven't developed a way to travel between the continents yet)
But i noticed, if i try to cheat teleport to the second continent, my character can't move until i teleport him back.

This happened also on the first continent while a plain was blocked off by a misplaced mountain tile.
 
First off, it needs to be higher than the water.  Secondly, I do believe it needs to be reachable for you to travel on it.
 
Hmm, this will be an issue. I believe i have seen some mods with several continents before.
If anyone knows a solution, it would be a immense help.
 
aparently you can solve this by linking the two continents with a strip of land underwater- (I haven;t done it myself but I think that you just have to make the bridge and then lower it to make it impassable.) There are threads on this topic, if you search.
 
I'm not sure what i should search for.

But if i make a landbridge, how do i make it underwater?
I guess i can lower it below the water of course, but wouldn't it still be visible?
Or does tiles below the water surface automatically get covered my water?

Oh, i just remembered dragging tiles, is that how? I'm not sure if i can make that look good without making a split in the water pattern.
 
Maps I can manage.

First off you can't cheat-click to another continent.
And to reach that continent and to be able to walk on it etc. you have to activate the cheats in the module.

This will allow you to use boats. And with boats you can travel anywhere (at sea).
But you have to have a party on the other continent so that the player can disembark. Because without a party on the continent you can't.
A village, castle or a city is to prefer, because you can always see them.

The problem with this is that no parties can travel over sea. If you want a solution to this ask Ruthven. He managed to solve it in RoY.

Or you can add a strip of land under water. Only problem here is to make it look good.
 
You can make a brigde over the two continents that is a gaint golden arrow as in ETW. It could look good  :wink:
 
NaglFaar said:
First off you can't cheat-click to another continent.
And to reach that continent and to be able to walk on it etc. you have to activate the cheats in the module.
I feel like I'm asking a bit much, but how do i activate that cheat?
NaglFaar said:
This will allow you to use boats. And with boats you can travel anywhere (at sea).
But you have to have a party on the other continent so that the player can disembark. Because without a party on the continent you can't.
A village, castle or a city is to prefer, because you can always see them.
Ah, i have a perfect setup for that.
NaglFaar said:
The problem with this is that no parties can travel over sea. If you want a solution to this ask Ruthven. He managed to solve it in RoY.
I'll ask him right away.

bjorne. said:
You can make a brigde over the two continents that is a gaint golden arrow as in ETW. It could look good  :wink:
If i can't figure it out, i guess that's a decent solution.
 
Yes, you can't teleport to unconnected islands.

However, using "party_relocate_near_party" somewhere in your coding will allow you to relocate the main party to an unconnected island, and thus allow you to travel on it.
 
Fei Dao said:
Yes, you can't teleport to unconnected islands.

However, using "party_relocate_near_party" somewhere in your coding will allow you to relocate the main party to an unconnected island, and thus allow you to travel on it.

Ah, i'll have to note that code. So, i can make that an option in a town menu, to relocate the players party to a town on the other continent, and vice versa? I'm not sure how to include that code in an option, but i'll have a look.
 
Fei Dao said:
Yes, you can't teleport to unconnected islands.

However, using "party_relocate_near_party" somewhere in your coding will allow you to relocate the main party to an unconnected island, and thus allow you to travel on it.

A quick question about this one.

Will this allow parties (not the player) to travel across water?
 
You would have to script a trigger or AI event that would make them "relocate".  I use the relocate operation when I crated my village founding kit.  Of course, I relocate the village to the player's location, but since they are both parties, it can work either way.  I can't tell you about the none connected islands and such, I have not needed anything like that in my mod.

Here is the basic line you would need:

(party_relocate_near_party,":new_village","p_main_party"),

Where ":new_village" is the party being moved and "p_main_party" is the party location you are moving to.
 
So i if i want an option to move the player is would be (party_relocate_near_party,":player","p_main_party"), ?
Another problem is that my 2 factions are each on the different continents, i suppose there is no way to make their parties reach each others?
If not, the best solution is to make a disabled castle/whatever to spawn armies on the opponents continent, right?
 
Sheriff-murder said:
So i if i want an option to move the player is would be (party_relocate_near_party,":player","p_far_town"), ?
Another problem is that my 2 factions are each on the different continents, i suppose there is no way to make their parties reach each others?
If not, the best solution is to make a disabled castle/whatever to spawn armies on the opponents continent, right?

Just so that you are clear (since the context of my reference was specific to my mod) the second part of the party_relocate is the destination.

Again you would have to script the travel for AI (meaning make them go to the "port" on one island, then once there, relocate them to the other island's "port"), but once they are both roaming the same continent, they should be able to have encounters just like in native.
 
But is it possible to make them actually "want" to go there?
I want the war to be fought like native, and not the player manually order the parties there.

(However, if impossible, it will have to do)

Edit: Also, i'm not comfortable with custom scripting just yet (just changing what is already there).
If i want to have an extra option in a port town that says "Sail to Costa del Sol", with the party relocate code. Where would that be?
(If the first question is impossible, how to make that an order would also be great)

Edit2: Ok, so i can see that flag 4 in parties are the menu flags, and they are currently set to "no_menu".
I need to find the default town menu, copy it and make a new one, right?

Edit3: Err, where can i find the default town menu? I found the town menu's but not the one used when flagged with "no_menu"
Sorry for all the questions  :oops:
 
Sheriff-murder said:
But is it possible to make them actually "want" to go there?
I want the war to be fought like native, and not the player manually order the parties there.

(However, if impossible, it will have to do)

Edit: Also, i'm not comfortable with custom scripting just yet (just changing what is already there).
If i want to have an extra option in a port town that says "Sail to Costa del Sol", with the party relocate code. Where would that be?
(If the first question is impossible, how to make that an order would also be great)

Edit2: Ok, so i can see that flag 4 in parties are the menu flags, and they are currently set to "no_menu".
I need to find the default menu, copy it and make a new one, right?

Edit3: Err, where can i find the default menu? I found the town menu's but not the one used when flagged with "no_menu"
Sorry for all the questions  :oops:

Yes, you can make them "want" to do many things, but if you are asking if they will go there with the Native AI scripts, I would say no.  You will have to have some kind of script or trigger that makes them go to the port.  Another trigger for when they enter the port to relocate to the other port.

By script or trigger, I mean you need to state the reason the AI wants to go there.  Maybe if they are at war, and they have more than x number of troops, they will invade.  Maybe the faction leader will decided after time to gather men at the port and invade.  You would have to make the trigger and the event that would cause it.

The options are defined in the game_menus.py.  Which menu I think is based on the encounter, but it's there.  Just have to check if the encountered party (there is a global var for this) is the port in the conditions for the menu option.
 
By want, i mean, will they understand it?
As in, "I want to reach that castle. It's unreachable. I need to trigger the code".
Rather than, "I want to reach that town (that triggers the code), code triggers" making it rather random.

The menu I'm looking for is the one with default town conditions (no siege, war, quest, etc),but i couldn't find it.
 
I think ruthven may have solved this problem.

I saw ona thread way back about him impletementing naval combat in RoY. He had it set up so that Lords would travel around on water and engage in naval combat and everything worked just like native, only with ships as well.

Haven;t played RoY so don't know how good it is, but get in touch with him
 
I have already talked to him, it didn't quite have the desired effect. But i am waiting for another reply.

(What i need first and foremost is the menu by the way)
Edit: I think i found it:
Code:
  (
    "town",mnf_enable_hot_keys,
    "{s10}{s11}{s12}{s13}",
    "none",
(and all the following information in that block)

Now, what should i do to add the option with the trigger to a copy of it? (And does it matter where i paste the copy, as in at the bottom of the file?)

Edit: I found an interesting code at the bottom of the town menu:
Code:
      ("sail_from_port",[(party_slot_eq,"$current_town",slot_party_type, spt_town),
                         (eq, "$cheat_mode", 1),
#                         (party_slot_eq,"$current_town",slot_town_near_shore, 1),
                         ], "Sail from port.",
       [(assign, "$g_player_icon_state", pis_ship),
        (party_set_flags, "p_main_party", pf_is_ship, 1),
        (party_get_position, pos1, "p_main_party"),
        (map_get_water_position_around_position, pos2, pos1, 6),
        (party_set_position, "p_main_party", pos2),
        (assign, "$g_main_ship_party", -1),
        (change_screen_return),
        ]),

Edit2: The best way would be just to add a "try", if to show the option or not, right? Can i make it look for a specific location(s), and if it's correct, it will show the option containing the relocate script?
I have tried this code:
Code:
      ("sea_travel",
       [
           (party_slot_eq,"$current_town",slot_party_type, spt_town)
        ],
         "Leave for Costa del Sol.",
         [
           (try_begin),
             (call_script, "script_cf_enter_center_location_bandit_check"),
           (else_try),
             (party_relocate_near_party,"p_main_party","p_village_9"),
             (change_screen_return),
           (try_end),
          ]),
And it works perfectly! I just need to know how to make a condition to look for the specific town.

spt_town is the one that looks for where to show the option, right?
I tried replacing it with "p_town_3", and got no errors. But it didn't show.
 
Back
Top Bottom