Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
First time using modmerger, giving me this while integrating PBOD...

Code:
modmerger_start version=201 type=2
invalid syntax

It adds its own code snippets at the end of every .py file, then causes problem itself? Know anything?
 
zidozido said:
does anyone have a template for family relations code ?

you either follow your module rules or create your own algorithm.

Native, as a example, is documented on script "initialize_aristocracy". 20 lords, 20 ladies, father/son/brother/married/unmarried as

Code:
#The first thing - family structure
	  #lords 1 to 8 are patriarchs with one live-at-home son and one daughter. They come from one of six possible ancestors, thus making it likely that there will be two sets of siblings
	  #lords 9 to 12 are unmarried landowners with sisters
	  #lords 13 to 20 are sons who still live in their fathers' houses
	  #For the sake of simplicity, we can assume that all male aristocrats in prior generations either married commoners or procured their brides from the Old Country, thus discounting intermarriage

You can check other modsys for different rulesets.

VC, as a example, doesn't use a dynamic (random) system like Native. It is based on history, so they set most things by hand (age, father, wife, etc), and use random for some lords personality and the initial relation between couples.

You can do the same. Follow Native strict rules. Re-code the algorithm. Do it manually. Up to what you are trying to do.
 
For the first time ever I dared to edit a texture because I don't want my Vaegirs to look like they just walked out of a tundra bandit camp. I have next to no proficiency with image editing programs but I gave it a try anyway. Half a day later, I managed to make something. After I made sure that everything has been converted to .dds format and put where it should be, I added the new texture to a selected armor in OpenBRF and...it worked.

Yes, it worked. Quite well, I might add. Here, look at it! https://i.imgur.com/QnV8Sc1.jpg IT. WORKS.

But here's the problem. When I went into the game I got this result. https://i.imgur.com/n64oxm5.jpg

WHY? It works just fine in OpenBRF so why doesn't it work in-game? I'm so frustrated...
 
kalarhan said:
KnightV said:
I have installed  pbod to my own mod but when i start a battle the speed of battle it is very very very very very veryyyyyyyyyy slow

"speed of battle" could mean a few things. If you are talking slow motion (not simple walking speed) then disable EDIT MODE on game launcher and try again, as the only operation for slow motion requires it.

If that was not a issue you will need to be more clear on your description and then start to track down what is causing the issue.


Fire_and_Blood said:
OPCODE ERROR in simple_trigger_57. Is there an easy way to figure out, which simple_trigger that is?

count to 58. My 10 years old nephew already knows how to count to 99.

joking aside you can use a few methods:

1) use Python console, import your file, and navigate the array
2) use the .txt file and find the trigger from there (easier to count)
3) add a comment on each trigger with the position number (#0, #1, #2, #3, ...)
4) use proper indentation on the entire file (see VC process_line_correction.py), then it is a easy way to search the code (just use a IDE and hide the code/content of each trigger, and a macro to go down 58 search of "])," or use a expression for the trigger header.
Concretically ?I use modmergered source of pbod 096.3 beta ,i have written it in modmerger option active mod list and compile,all are good .But in game when i press take the field game became very slow(motion) when i changed the battle phase option to "Lastest" the motion became faster but it very slow yet.What should i do?Maybe there is and code with "time" and i may to set proper speed in battle?
 
Maluxorath said:
WHY? It works just fine in OpenBRF so why doesn't it work in-game? I'm so frustrated...

OpenBRF is a isolated program, not related to the game engine, that lets you preview your item. If you make some configuration mistakes that break the graphics inside the game, you may not get a warning in the OpenBRF tool.

A common mistake is the wrong order on your module.ini entry. You need to add the assets in the order: texture -> material -> mesh.
Other common mistake is wrong flags on your item (which you can check on OpenBRF by comparing it with another working item)
 
kalarhan said:
A common mistake is the wrong order on your module.ini entry. You need to add the assets in the order: texture -> material -> mesh.

What would I ever do without you, Saint? I was ready to jump ship and forget about making any new textures ever again and then you saved it with a spot-on answer. It turns out that I didn't have a .brf file for textures (since I didn't even know I needed one) and I didn't have it in my module.ini file. Now it works as it should. :grin: https://i.imgur.com/SSSb13p.jpg

P.S. With the new-found confidence I decided to do another re-texture and it worked immediately without any issues.  :party: https://i.imgur.com/12wNnwY.jpg

 
Is it possible to obtain original information from parties?

let's say i start with this:
                         
Code:
("town_3","Veluca",   icon_town_rhodok_veluca|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-57.4, -44.5),[], 80),
and ingame run the following:

Code:
(party_set_name, "Big Apple", ":p_town_3"),
(party_set_icon, ":p_town_3", icon_village_a),
(party_set_position, ":p_town_3", pos2),
(party_set_flags, ":p_town_3", pf_village),

Will the information from the original line be lost forever, or is there a way to access that information, after it has been changed?

Basically, I want to use the town in game, while also using it's original information as a base for new towns. (same for other settlements)
 
Fire_and_Blood said:
Will the information from the original line be lost forever, or is there a way to access that information, after it has been changed?

note: wrong order of parameters, also String below is invalid as it is missing the "@"
Code:
(party_set_name, "Big Apple", ":p_town_3"),

New data will override the memory and savegame. That doesn't mean you can't use other means to get it back, like create utility methods at compilation time (Python function to parse the data would make this easy), or use slots of the party to store old values, and so on.

Edit:
Fire_and_Blood said:
Basically, I want to use the town in game, while also using it's original information as a base for new towns. (same for other settlements)

Easiest way is to create clones of your parties (towns) that are disabled and outside the constants ranges. Again a quick/easy way is to use a Python function to create the copies.

VC uses this to create copies of items with different flags, like a clone version of weapons without swing attack (it needs that for formations).
 
Thank you.

I tried using party_template for new village, but that seems to be the wrong approach.
So I tried to create a party_template for snowy villages, with correct icons, etc. and then use the following code, to build a new snowy village, but it doesn't work. I can't get it into the village_range, or can I?
in party_templates:
Code:
("snowy_village", "Snowy Village", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(152.3, 53.5),[], 170),
in scripts:
Code:
(spawn_around_party, ":nearby_town", "pt_snowy_village"),
 
Fire_and_Blood said:
village_range

what do you mean by village_range? The ranges used from module_constants.py are created at compilation time, so they are static. If you need a dynamic range you need to use a different approach, like a loop on all parties filtered by something (type, a slot, etc) that define villages.

Code:
########################################################
##  PARTY SLOTS            #############################
########################################################
slot_party_type                = 0  #spt_caravan, spt_town, spt_castle
#slot_party_type values
##spt_caravan            = 1
spt_castle             = 2
spt_town               = 3
spt_village            = 4
 
Fire_and_Blood said:
Yes, that was the idea, to get the new village between villages_begin and villages_end, which doesn't seem possible, by spawning the village from party_templates

Native has some code conventions like the use of ranges from module_constants.py.

You are not required to use or follow those conventions, as that is all done on the modsys and thus can be replaced by whatever makes sense to your own requirements. Just remember to replace any old code that will be rendered useless/broken/buggy by your new conventions, and to pay special attention when using other people code (OSP).
 
%EC%BA%A1%EC%B2%98.PNG



i have a question..

first of all im using window 7 and directx 11 version.. and when i run mount and blade, an error message occured.."need lastest directx version" is it mean i should upgrade to 12 version?(and im using cwe osp items .. i guess this is the reason..)

and second..i have no idea why unit's armor is black? and why land texture is using other texture? (natvie version is 1.172 and my mod version is 1.153...  is there a problem cuz of game version?
 
dlwnsdn4 said:
first of all im using window 7 and directx 11 version.. and when i run mount and blade, an error message occured.."need lastest directx version" is it mean i should upgrade to 12 version?(and im using cwe osp items .. i guess this is the reason..)

and second..i have no idea why unit's armor is black? and why land texture is using other texture? (natvie version is 1.172 and my mod version is 1.153...  is there a problem cuz of game version?

Are you the modder or are you playing a old mod? If the latter you should check the board/thread of whatever mod you are playing.

Game only uses DX7 and DX9. Open the game launcher (where you choose a module to play), open settings/configure, video, and check which option you are using (should be DX9 unless the mod requires DX7).

It is likely that you will have issues playing a old mod (based on 1.153 engine) like in-game errors.
 
Hi all, quick question:

is there an operation that commands an agent to go in "charge mode"? I don't want to tell the whole team to charge, just a specific agent.

Thanks
 
Khamukkamu said:
is there an operation that commands an agent to go in "charge mode"?

alarmed

Code:
agent_set_is_alarmed                     = 1807  # (agent_set_is_alarmed, <agent_id>, <value>),
                                                 # Sets agent's status as alarmed (value = 1) or peaceful (value = 0).

you can also set agents on special mode, disable movement speed, etc, to keep them behind.
 
kalarhan said:
dlwnsdn4 said:
first of all im using window 7 and directx 11 version.. and when i run mount and blade, an error message occured.."need lastest directx version" is it mean i should upgrade to 12 version?(and im using cwe osp items .. i guess this is the reason..)

and second..i have no idea why unit's armor is black? and why land texture is using other texture? (natvie version is 1.172 and my mod version is 1.153...  is there a problem cuz of game version?





Are you the modder or are you playing a old mod? If the latter you should check the board/thread of whatever mod you are playing.

Game only uses DX7 and DX9. Open the game launcher (where you choose a module to play), open settings/configure, video, and check which option you are using (should be DX9 unless the mod requires DX7).

It is likely that you will have issues playing a old mod (based on 1.153 engine) like in-game errors.

im making own mod.. anyway i should change directx 11 to 9..
and is there a way to solve that error? im using diplomacy+pbod+freelancer old module system.. and there is not new version of  diplomacy+pbod+freelancer modules for 1.172(impossible to copy all scrpts and paste to new module system for me)
 
Status
Not open for further replies.
Back
Top Bottom