Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Mike12096 said:
Hello,
I started to get back to modding my warband mod via using Rubik's Custom Commander's source codes as my base mod when after I implemented JRider's Nobility Titles I stumbled upon a problem. Every lord have incorrect titles that aren't even their own factions titles but also are female ones...

57al3ehy85fytyozg.jpg
ranr61pfjexrlr1zg.jpg

All I did was simply use both Floris Expanded source code and lazeras KAOS Political source code as a way to guide me on how to better install and understand how JRider's titles work and what-not.

  KAOS Political also implements titles.  Especially if you have added even 1 new faction, be concerned about getting titles changed twice, once by the change you think YOU added, and again by KAOS, in two different places.  KAOS is extremely difficult to work with if you have more factions than native, as it creates up to 3 times as many factions to account for rebellions and so on, and this will impact your data model as well.  You could use W.R.E.C.K. to warn you of duplicate script names and then hunt down the conflicting definitions via "find in files" the last part of the script name (leave off  script_  in your search and just use the last part of the script name so it can find all uses of the script).  If you have for example 7 factions but you defined only 6 titles, the 7th title will be whatever string followed the 6th title as defined in module_strings.  Its likely both KAOS and your other custom titles code point to different strings for titles, so you see a mix from each.
 
I was playing on a mod, and I was wondering how I could implement one of their features myself on my mod via the module system.
In the mod they managed to make different faces have different hairstyles. e.g Asian faces just have long hair/ponytails and a few beards/moustaches, but a white/european face has short hairstyles and lots of beards/moustaches.
I was wondering how I would go about doing this, because I find it weird when my Asian soldiers have monk haircuts with eccentric moustaches :razz:

Thanks - Max
 
Max2150 said:
I was playing on a mod, and I was wondering how I could implement one of their features myself on my mod via the module system.

start by downloading (if available) their modsys and studying it. It sounds like they have multiple entries on module_skins.py for each "race", similar on how Native has two entries for generic male and generic female.
 
Thank you for the reply, unfortunately the modsys is unavailable so i'll just have to mess around a bit :razz:

However, I have another question about the same mod.

How on earth do they do something like this?? :https://ibb.co/ef2RmK
 
Max2150 said:
Thank you for the reply, unfortunately the modsys is unavailable so i'll just have to mess around a bit :razz:

However, I have another question about the same mod.

How on earth do they do something like this?? :https://ibb.co/ef2RmK

look at skins.txt, you can at least count how many entries are there and see if that is the path they used

that looks like a custom presentation (you can draw/do anything you want with them)
 
You were correct that in the skins.txt they have added new pieces of code for each 'race', now I have to assign that depending on the different factions somehow. Thanks for the help :smile:
 
Max2150 said:
now I have to assign that depending on the starting faction chose somehow

Code:
troop_set_type                           = 1505  # (troop_set_type, <troop_id>, <gender>),
                                                 # Changes the troop skin. There are two skins in Native: male and female, so in effect this operation sets troop gender. However mods may declare other skins.
 
Oh ok, I see the file now. This header_operations.py file is going to help me a lot understand the code more. :razz:
I'm such a noob I don't really know how to do anything. Thank you for the replies though :smile:
 
1. I kind of have a general question about the module system. How does one go about creating a presentation, I'm not quite sure what a lot of the code does or how it works, is there a specific page where I can read about how it works and how I can make something? - Thanks
2. One of the things I wanted to change was at the start of the game when you have to choose where you want to start, I would like the text to be inside a button instead of just lines of text on a white space, you know sort of make that page more attractive such as moving the text up the page a bit.
 
Max2150 said:
How does one go about creating a presentation

presentations are not hard per si, but they require a lot of basic know-how, which puts them in the advanced category for coding. Starting with them is likely to take you to a road of frustation, but it is your project and time. One of the reasons is the lack of tutorials. You will need to read the modsys documentation, look at examples, download some interesting OSP and see how they did what, and learn as you go. Something that is much easier for a experienced coder to do (someone that already spent time with scripts, triggers, constants, and all that).

game menu and dialogs are a much easier way to handle UI, as they are mostly hardcoded and ready to go. Presentation is free form. You do whatever, but at the same time you need to do all of it  :razz:
 
Oh dear, once again you've been a hero :smile: I'll probably just skip it then.

Sorry for the amount of questions, but I'm adding in some new weapons, and i've met a brickwall (sort of).

When adding in 'naginata polearm' weapons similar to the khergit halberd. I was wondering which item_capabilites are needed for having the item swing and thrust while on a horse. What is the difference between itc_staff and itc_nodachi. Do i need to make the weapon itp_type_polearm or a itp_type_two_handed_wpn.

Thanks - Max
 
Max2150 said:
When adding in 'naginata polearm' weapons similar to the khergit halberd. I was wondering which item_capabilites are needed for having the item swing and thrust while on a horse. What is the difference between itc_staff and itc_nodachi. Do i need to make the weapon itp_type_polearm or a itp_type_two_handed_wpn.

easier way is to copy another similar weapon, then add more flags as needed. Each type of flag controls a particular aspect of the weapon, like if it should use the polearm proficiency (instead of 2-handed or 1-handed or ...); which animations/types of attacks are allowed - on horse or ground; the priority to equip the agent, and so on.

some flags are cumulative. Think of this flag: 31 (1+2+4+8+16). To make it easier to read the code some utility constants are used like
Code:
itc_nodachi    = itc_cut_two_handed | itc_parry_two_handed
^ file header_items.py and some on module_items.py

what cut 2 handed means? Look at that flag and
Code:
itc_cut_two_handed = itcf_force_64_bits | (itcf_slashright_twohanded | itcf_slashleft_twohanded | itcf_overswing_twohanded | 
                                           itcf_horseback_slashright_onehanded|itcf_horseback_slashleft_onehanded)
you can see what attacks is using, and so on.
 
Thank you ever so much once again  :eek:. You my good sir, are a hero and a Saint. I may have to start bowing down whenever I see your name  :razz:.
 
Max2150 said:
So I was adding in items in my modile_items.py file, but when compiling I got this message

TypeError: object of type 'int' has no len()

invalid syntax. Review your items (changes) and fix them. Something simple like missing a comma, "[", ... or forgetting a parameter breaks the parser. Baby steps. Small changes, save, compile, repeat.
 
I never knew you had to place a ¦ between certain pieces of code in the items file. I assumed you could also use a comma  :razz:
Thanks for the help again :smile:
 
kalarhan said:
Gess1t said:
Is it possible to give item as a bonus with the classic gold/xp quest rewards ?

something like a sword as the quest reward? Then yes, just add the item to the player troop "trp_player"

searched more and found this:

(troop_add_item, "trp_player", "itm_sword_viking_1", 0),

so i've to apply the line after the ending dialogue.

My second quick question will be:  can i force a certain party to besiege a town even if this one isn't a member of a kingdom?

Like i can force bandit to besiege a town, and then enter instantly in battle with the party when behind the wall
 
Status
Not open for further replies.
Back
Top Bottom