Shipyards and Hunting (forget the music)

Users who are viewing this thread

Three questions:
1.1: Can I create a new type of town called a Shipyard and use it only to buy ships from it?
1.2: Can I pre-define several towns that will have the "Buy a ship" menu option in them? (The others won't have it)
2. I seem to have problems with Highlander's hunting integrations. The animals don't show in the scene and it constantly spaws "SCRIPT ERROR" messages. If someone has already integrated hunting into his work, can he PM me or post here what do I need to integrate?
3. Look at post 4

Thank you for your time and replies. If I have written unclearly and incomprehensible in the post above, tell me please.
 
Lumos said:
Three questions:
1.1: Can I create a new type of town called a Shipyard and use it only to buy ships from it?
1.2: Can I pre-define several towns that will have the "Buy a ship" menu option in them? (The others won't have it)
2. I seem to have problems with Highlander's hunting integrations. The animals don't show in the scene and it constantly spaws "SCRIPT ERROR" messages. If someone has already integrated hunting into his work, can he PM me or post here what do I need to integrate?
3. Q: Can you remind me how was the main theme sound called, so I can replace it?
    A: Found it.

Thank you for your time and replies. If I have written unclearly and incomprehensible in the post above, tell me please.

1.1 - Yes.  In relation to 1.2, you can make a party slot (call it shipyard).  In the menus used for towns, check to see if the slot is set to 1 (for shipyards) in the conditions for your ship buying menu.

2 - not there yet myself, haven't played with it.

 
Lumos said:
2. I seem to have problems with Highlander's hunting integrations. The animals don't show in the scene and it constantly spaws "SCRIPT ERROR" messages. If someone has already integrated hunting into his work, can he PM me or post here what do I need to integrate?

This one I have encountered. I don't really remember what I missed, but I had missed something.
What I did was to go through the whole MS, file by file and look for the entries.

After a while I realized that I had missed something.
 
I integrated Mirathei's Sea Battles and added this in the town menus:
    ("sail_from_port",[(party_slot_eq,"$current_town",slot_party_type, spt_town),
                        (party_slot_eq,"$current_town",slot_town_port, 1),
                        ], "Buy a ship (2000 denars)",
      [(assign, "$g_player_icon_state", pis_ship),
      (party_set_flags, "p_main_party", pf_is_ship, 1),
      (troop_remove_gold, "trp_player", 2000),
      (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),
      ]),
and before that I defined slot_town_port in module constants.
Now I have to ask:
How to define which towns are "ports"?
Did I have to use slot_town_port or spt_town_port?
 
Lumos said:
I integrated Mirathei's Sea Battles and added this in the town menus:
    ("sail_from_port",[(party_slot_eq,"$current_town",slot_party_type, spt_town),
                        (party_slot_eq,"$current_town",slot_town_port, 1),
                        ], "Buy a ship (2000 denars)",
      [(assign, "$g_player_icon_state", pis_ship),
      (party_set_flags, "p_main_party", pf_is_ship, 1),
      (troop_remove_gold, "trp_player", 2000),
      (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),
      ]),
and before that I defined slot_town_port in module constants.
Now I have to ask:
How to define which towns are "ports"?
Did I have to use slot_town_port or spt_town_port?

Which to use is defined by what you are doing.  If you create a slot called slot_town_port, then checks/calls/changes to this slot would be done with the slot named slot_town_port (or the slot number you used to define it). 

I have often found it's hard to back track and find all the instances and areas that are used by some of the native stuff, so I sometimes bypass it completely. 

Remember, slots are just numbers.  In constants.py you define a tag word that you can use to represent that number.  If you defined the slot like such:

slot_town_port = 200

Then your line:
(party_slot_eq,"$current_town",slot_town_port, 1),

would be the same as:
(party_slot_eq,"$current_town",200, 1),

In fact, anywhere you wanted to use the number 200, you could instead put slot_town_port, because that's what it equals.

Hope that clears it up for you.
 
A bit, but I need to know how do define something like this:
In the beginning of the file: (which one?)
town_port = ("p_town_1", "p_town_2"), etc.
(or spt_town_port, or slot_town_port, or whatever is needed)
or something like this because I really don't know where and how to define this. And just to clear it up, I need to define in which towns will this option (to buy a ship) show up, like Tirh and Wercheg or something.

EDIT: And that's because of this: In the Prophecy of the Black Heart mod, you can buy a ship in towns that are located deeply on the continent, far away from water. The mod is awesome and the sea battles in it inspired me to add them to my mod too, but I wanted to add some kind of a check to see if the town is near water, because there is absolutely no sense in making it able to buy a ship on the continent, far away from the sea.
 
ok.  Well, if you have the slot defined in constants.py, the next step would be marking the towns that have a port (are on water).  I would go away from checking if a town has a port, unless:

1. you are creating new towns (like the settlement mod - or my village founding scripts) that can be near the water
2. You are allowing towns to up grade to ports later down the road.

Doing these would make things a bit tricky, and I would not go there yet.  What you will need to do is pick the towns that will have ports.  My default the slot number you are using for ports (make sure this does not overlap an existing definition for a party slot used for towns!) would be 0.  So at the end of the first script, script_game_start, you would add a line like this:

(party_set_slot,"p_town_2",slot_town_port, 1),                ##Set Tihr as a port

All this does is set the flag for a port to 1.  You will then need to check this slot if it is 1 when entering the town.  If it is, then give the port menu options.  Hope this gets you going in the right direction.
 
Final Code then (it run in Warband)  :D

Buy ship in port cities only:

Module_constans
#sea battles buy ship idibil test
slot_town_port = 240
#buy ship end

Module_game_menus (u see menu if u have 2000 coins only. For test, change (ge, ":gold", 2000), by (ge, ":gold", 100), by example

#sea battles buy ship idibil test
    ("sail_from_port",[(party_slot_eq,"$current_town",slot_party_type, spt_town),
                        (party_slot_eq,"$current_town",slot_town_port, 1),                       
                      (store_troop_gold,":gold","trp_player"),
                    (ge, ":gold", 2000),
                        ], "Buy a ship (2000 denars)",
      [(assign, "$g_player_icon_state", pis_ship),
      (party_set_flags, "p_main_party", pf_is_ship, 1),
      (troop_remove_gold, "trp_player", 2000),
      (party_get_position, pos1, "p_main_party"),
      (map_get_water_position_around_position, pos2, pos1, 7),
      (party_set_position, "p_main_party", pos2),
      (assign, "$g_main_ship_party", -1),
      (change_screen_return),
      ]),
#buy ship idibil test end


      ("collect_taxes_qst",[(check_quest_active, "qst_collect_taxes"),
                            (quest_slot_eq, "qst_collect_taxes", slot_quest_target_center, "$current_town"),
                            (neg|quest_slot_eq, "qst_collect_taxes", slot_quest_current_state, 4),

module_scripts (change it with your port)

        (party_set_slot,":town_no", slot_town_reinforcement_party_template, "pt_center_reinforcements"),
      (try_end),


# sea battles buy ship idibil test
      (party_set_slot,"p_town_2",slot_town_port, 1),                ##Set Seals-ey as a port  
    (party_set_slot,"p_town_7",slot_town_port, 1),                ##Set Caer Liwelydd as a port  
    (party_set_slot,"p_town_13",slot_town_port, 1),                ##Set Caer Segeint as a port  
    (party_set_slot,"p_town_17",slot_town_port, 1),                ##Set Caer Uisc as a port  
    (party_set_slot,"p_town_19",slot_town_port, 1),                ##Set Dun At as a port  
    (party_set_slot,"p_town_27",slot_town_port, 1),                ##Set Bebbanburh as a port  
    (party_set_slot,"p_town_32",slot_town_port, 1),                ##Set Dun Keltair as a port  
    (party_set_slot,"p_town_33",slot_town_port, 1),                ##Set Aileach as a port  
    (party_set_slot,"p_town_37",slot_town_port, 1),                ##Set Duin Foither as a port  
    (party_set_slot,"p_castle_42",slot_town_port, 1),                ##Set Caer Manaw as a port    
#buy ship idibil test end

 
# Castles
      (try_for_range, ":castle_no", castles_begin, castles_end),

Thx Lumos and Jik
 
@ Lumos is this a working kit then?

if so how did it turn out :?:

If you need some low poly ship varients I would like to contribute
when I get done working current things:

1) political relations menu (unsure stage)
2) more varients for animated map icons ie bandits, horsey knights etc. (doable)
 
It's not actually a kit, it's in my mod.
I'd love more ship models, if you give them out.
For the relations menu, I'm developing a Diplomacy presentation - perhaps it could suit you? It shows names of all kingdoms and color-codes your relation with them. It's currently on an Alpha stage though, and it's not very usable.
 
Lumos said:
It's not actually a kit, it's in my mod.

cool, maybe I will look into the ship battle kits also as I just added Norman Raider Bandits
near the normandy coast so adding some vik ship varients to sail around the german sea
might suit it well.

Lumos said:
I'd love more ship models, if you give them out.

no problem, I dont mind sharing stuff others will enjoy too.
let me look into some kind of working sea kit to test some models out in
then I can simply make another icon kit then get back to you on that.

I was thinking of starting out with this one :)
G1026.jpg

Lumos said:
For the relations menu, I'm developing a Diplomacy presentation - perhaps it could suit you? It shows names of all kingdoms and color-codes your relation with them. It's currently on an Alpha stage though, and it's not very usable.

As far as the political relations menu goes I am interested! & you can read more about specifics/examples
I posted in the Mod makers Q&A thread page 220. I also posted a few Ideas & Concepts but I am still
unsure it will work with menu scripting kingdom border lines textures & overlays that change shade as
relations change when used with fire arrows menu scripts I would be glad to see some kind of alternative
if that fails so I have something dif then the plain text we have now.
 
Back
Top Bottom