Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Redleg said:
It could be that the CWE has meshes, materials, and textures in separate BRFs instead of in the same brfs.  For example, you will see a BRF called cwe_armor_meshes_hospitaler that has meshes and materials.  Then if you go to the BRF called cwe_materials, you will see a bunch of materials, including materials that are also in the cwe_armor_meshes_hospitaler BRF.  There is also a cwe_textures BRF.

My advice would be create a single BRF having all the armor meshes, associated materials, and textures for the armors and equipment you wish to import into your game.  Double check to make sure your mesh references the proper material and that the material references the proper textures and shader.

When I tested it having meshes, materials and textures separated (with meshes in various brfs, all materials in 1 and all textures in 1) it reduced start-up time by 30%. This was actually with a version of Warsword Conquest I was playing. I believe Native and VC also use this structure. So it's probably better if he can retain that structure if possible.
 
kraggrim said:
Redleg said:
It could be that the CWE has meshes, materials, and textures in separate BRFs instead of in the same brfs.  For example, you will see a BRF called cwe_armor_meshes_hospitaler that has meshes and materials.  Then if you go to the BRF called cwe_materials, you will see a bunch of materials, including materials that are also in the cwe_armor_meshes_hospitaler BRF.  There is also a cwe_textures BRF.

My advice would be create a single BRF having all the armor meshes, associated materials, and textures for the armors and equipment you wish to import into your game.  Double check to make sure your mesh references the proper material and that the material references the proper textures and shader.

When I tested it having meshes, materials and textures separated (with meshes in various brfs, all materials in 1 and all textures in 1) it reduced start-up time by 30%. This was actually with a version of Warsword Conquest I was playing. I believe Native and VC also use this structure. So it's probably better if he can retain that structure if possible.

You make a good point but the point I was trying to make was that the problem the person was experiencing may be due to missing texture files, which weren't included with the brf having the meshes and materials.  If they are going to add just a few armors, it would make sense to put all the meshes, materials, and textures into the same brf to ensure that everything they needs is there and that the brf does not hold meshes that are not used.
 
Redleg said:
You make a good point but the point I was trying to make was that the problem the person was experiencing may be due to missing texture files, which weren't included with the brf having the meshes and materials.  If they are going to add just a few armors, it would make sense to put all the meshes, materials, and textures into the same brf to ensure that everything they needs is there and that the brf does not hold meshes that are not used.

Ah you're right, I kinda missed the point of your post lol.
 
Redleg said:
Nameless Warrior said:
I have put some of the crusader way to expediation OSP into the game for the Arabian faction and I am getting this shine on the textures

Any idea what the issue is?

It could be that the CWE has meshes, materials, and textures in separate BRFs instead of in the same brfs.  For example, you will see a BRF called cwe_armor_meshes_hospitaler that has meshes and materials.  Then if you go to the BRF called cwe_materials, you will see a bunch of materials, including materials that are also in the cwe_armor_meshes_hospitaler BRF.  There is also a cwe_textures BRF.

My advice would be create a single BRF having all the armor meshes, associated materials, and textures for the armors and equipment you wish to import into your game.  Double check to make sure your mesh references the proper material and that the material references the proper textures and shader.

They are all in one brf, I auto imported from the brf's i needed and then manually imported all of the .dds files into the brfs as they are not there by default (took me ages). I didn't import the normal and specularmap files into the brf, they are just in the module texture folder, could that cause the sheen issue?
 
I have  2.021 version of viking conquest, does the 2.023's module source applyable?Also is there a way to adjust after battle loot for per troop?
 
Ruan said:
I have  2.021 version of viking conquest, does the 2.023's module source applyable?

the beta version (Steam) is 2.023, as it is the preview for the modules. You can download it, mod it and compile it inside your VC folder without any issues, but I recommend you create a copy

game folder\modules
                                \Viking Conquest
                                \VC_mymod

Copy one folder to the other (so you have the sounds, music, textures, etc), then compile your source code to your new folder.

Also is there a way to adjust after battle loot for per troop?
Search for the menu involved on pos-battle loot and change how it calculates your share (module_game_menus)

From the game you have the string (text) that shows up there, like "Leave all the loot for your men". Follow the code from that point on.
 
Also I've edited the text files, applied some tweaks do I need to redo it?Also do I need to create my mod folder in VC folder?Also where to put VC module source files  :oops:
 
Ruan said:
Also I've edited the text files, applied some tweaks do I need to redo it?Also do I need to create my mod folder in VC folder?Also where to put VC module source files  :oops:

tweaks on text files will be removed. You should instead apply then to the source now, so they will be there on every compilation. Keep in mind that the devs will release a new version soon, which will require you to merge it. And that you can't post/share your edited modules until TW releases the official version (that will require the serial key). Text files are OK if you want post it.

Folder: if you want, best to do it so you have a clean/vanilla folder as backup, also if you want to play the vanilla game (multiplayer, etc)

Source files: anywhere you want, make sure you keep backups of it (check github.com as a example)
 
What do I do if compiler hates me?

I have an item (gloves). I have a troop that uses this item. The compiler does not compile.
"OK" - I say. - "Maybe something is wrong with the item?"
I check it 100 times, then, after having found no errors, I create a copy of another pair of gloves (the one that works), give it the name of my gloves and comment my gloves.
The compiler does not compile.
"OK" - I say. - "Maybe something is wrong with the name?"
I try 100 different names (the initial one 11gauntlets_L, then glovesbl, then darkplategl, then darkplategauntl, then dark_plate_gl, then ****youcompiler). The compiler does not compile.
"OK" - I say. - "Maybe I mistyped the name of the item in module_troops file?"
I replace the name of my gloves with a name of another pair of gloves. The compiler compiles.
Alright... I very very carefully copy the name of my gloves from module_items and very very carefully replace the "hourglass_gauntlets" part in "itm_hourglass_gauntlets" (that was the pair of gloves that compiled) with the name of my gloves (currently glovesbl which becomes itm_glovesbl).
The compiler does not compile.
What does this evil program want from me?

P.S. Oh, I forgot. The error is "name 'itm_glovesbl' is not defined".

P.P.S. I also tried:
- checking adjusted items for possible errors;
- putting my gloves somewhere else in module_items (like a different place between different items);
- giving my gloves (which are, btw, not mine, they are from an OSP; by "my" I only mean "the ones I currently have problems with") to a different troop;
...all to no avail.

P.P.P.S.
By "the ones I currently have problems with" I mean "the ones with which name I have problems". Because when I swap names of 2 pairs of gloves ("mine" and another one that works), the compiler still complains about the name (i.e. the old pair of gloves).
BUT changing the name doesn't help either. I tried it. Multiple times.

P.P.P.P.S. NVM, the end of the story:
1) I created 2 identical (ctrl+c, ctrl+v) copies of "my" gloves: glovesbl and glovesblack.
2) I try the first one. "Item not defined". I try the second one. "Item not defined".
3) I give both of them to the troop. The compiler complains about one of them (glovesbl).
4) Fine. I remove it. The compiler is happy. It thinks it achieved its goal: to make me give up "my" new gauntlets.
It finally compiles.
 
@Leonion to get a quick solution, you should post the entire error (screenshot) + code for the troop and the items on that compilation.
Since you didn't, here is my solution for such a problem:
1. Remove any refence to that item, the one which the compiler is crying about, from module_troops
2. Compile; it should compile with no errors
3. Add the item back to module_troops
4. Compile again; it should compile with no errors

The above thing is also applied to troops withing module_parties and also when you want to rename an item that is referenced in module_troops.
Why is that so? Because the compiler generates the id_items.py file witch contains the references to items; because of the order of compilation, the reference to a newly added item is not available when module_troops compiles (the reference to the newly added item is not present in id_items, and the compiler tries to compile module_troops).
 
The_dragon said:
Why is that so? Because the compiler generates the id_items.py file witch contains the references to items; because of the order of compilation, the reference to a newly added item is not available when module_troops compiles (the reference to the newly added item is not present in id_items, and the compiler tries to compile module_troops).

Oh...
Thank you for the explanation.
And here I though the robot rebellion started.  :grin:

P.S.
Hmm...
I just remembered one fact though that doesn't really fit your explanation.
This troublesome pair of gloves was actually in the game for quite some time. I compiled the game before with them in it many times. Between the last successful compilation (which was yesterday, and these gloves were in it with the same name 11gauntlets_L, and I even think they were already used by that very same troop I had problems with today) I only added 3 body armors (which I didn't give to anyone yet). I only started all the renaming attempts after the compiler all of a sudden had complained about this pair of gloves (11gauntlets_L, the name they had long before today).
Well, unless it was like this: the compiler initially didn't like "11" in the beginning of the name (it didn't care much when they were unused but started to care now), and then I started renaming them, and then your explanation can be applied.
Though I'm not sure they were unused during the last successful compilation before this incident. I may or may not have already given them to this troop. I just don't remember this... :sad:

Anyway, thank you for responding.
 
setoz53 said:
Just need to ask 3 questions, i updated & fixed Arch3r's Invasion script.


1st Question,

How i can show wave number like Wave: 1 instead of just"1"
How i can show Respawn wave like "Respawn Wave" instead of just "4"

2nd Question,

How i can add Wave Preparation when any wave ends like Wave 1 ends, Wave 2 Preparation: 25 Seconds then wave 2 starts.


3rd Question,

Where i can find Refill Health,Refill Ammo,Repair Shield scripts? Thanks.

...
 
setoz53 said:
setoz53 said:
Just need to ask 3 questions, i updated & fixed Arch3r's Invasion script.


1st Question,

How i can show wave number like Wave: 1 instead of just"1"
How i can show Respawn wave like "Respawn Wave" instead of just "4"

2nd Question,

How i can add Wave Preparation when any wave ends like Wave 1 ends, Wave 2 Preparation: 25 Seconds then wave 2 starts.


3rd Question,

Where i can find Refill Health,Refill Ammo,Repair Shield scripts? Thanks.

...
You say you updated and fixed Arch3r's Invasion script, you should be knowledgeable enogh to do these but...
1.
Search for the presentation of waves in module_presentations and change the 1 to wave 1

2.
Use mission template triggers with a delay interval of 25 to spawn the next wave.

3.
:neutral:????
 
Congratz on trying to make NordInvasion 2.0.
Erennuman's answers are basicly the same that I'd give you, so I'll answer Question nr. 3:
Create the scene props in module_scene_props.py and a ti_on_use trigger that calls a refill for HP/ammo/shield HP for the using agent.
 
Hi modding companions!

I am at the stage of my mod, where I'd like to make regular troop (let's call him Sidh Acolyte), which player could equip as npc hero.

So I wrote this:
#SCRIPT_UPGRADE_TROOP_equipment
# INPUT: troop_to_exchange
# OUTPUT: none
("exchange_regular_equipment_facility", [
  (store_script_param_1, ":troop_id"),
 
  (troop_clear_inventory, "trp_temp_troop"),
  (troop_add_items, "trp_temp_troop", "itm_pilgrim_disguise", 2),
 
  (party_add_members, "p_main_party", "trp_sidh_acolyte",1),
  (set_player_troop, "trp_temp_troop"),
 
  (change_screen_equip_other,":troop_id"),             
  #(change_screen_equip_other,"trp_sidh_acolyte"),              # (change_screen_equip_other, <troop_id>),
 
 
  (set_player_troop, "trp_player"),
  (party_add_members, "p_main_party", "trp_sidh_acolyte",1),
 
  (party_remove_members,"p_main_party","trp_temp_troop",1),
 
]),

I added line in dialogs
Code:
   "I want to change equipment of Sidh Acolytes.", "member_trade_aco",[]],
  [anyone,"member_trade_aco", [], "Very well, choose what want...", "do_member_trade",[
(call_script, "script_exchange_regular_equipment_facility", "trp_sidh_acolyte"),
     

Mostly everything is correct. After dialog request player is sent to trading screen. Now the problem is that (set_player_troop, "trp_temp_troop"), probably doesn't work.

At trading screen I see my own items, not the items I gave to temp_troop 
Code:
" (troop_clear_inventory, "trp_temp_troop"),
  (troop_add_items, "trp_temp_troop", "itm_pilgrim_disguise", 2), "

How do I get it work? Is there any other way of changing the player to temp_troop? Or this is bad way to implement this idea?
 
Do you know why is this coming ?

v5Zn5O.png

I was integrated age of machinery to my mod;

https://forums.taleworlds.com/index.php/topic,344460.0.html

and changed this presentations consequences for prevent AI catapult and AI cannons fight together;

lvE5WE.jpg

After clicking continue, this shows up;

v5Zn5O.png

After clicking continue, presentation ends and throws to pre-condition menu. I moved the battle situation conditions to there. This is one of them.
Code:
...
(else_try),
            (neq, ":cur_terrain", rt_bridge),
            (neq, ":cur_terrain", rt_deep_ocean),
			(eq, "$fin_cannon", 1), # if cannon researchment has finished
            (set_jump_mission, "mt_lead_charge"),
			(call_script, "script_cf_setup_random_scene"),
            (jump_to_scene, ":scene_to_use"),
			
			(assign, "$g_next_menu", "mnu_simple_encounter"),
          (jump_to_menu, "mnu_battle_debrief"),
          (change_screen_mission),
          (else_try),
		  (neq, ":cur_terrain", rt_bridge),
            (neq, ":cur_terrain", rt_deep_ocean),
			(neg, "$fin_cannon", 1), # if cannon researchment hasn't finished
            (set_jump_mission, "mt_lead_charge_catapults"),
			(call_script, "script_cf_setup_random_scene_catapults"),
            (jump_to_scene, ":scene_to_use"),
			
			(assign, "$g_next_menu", "mnu_simple_encounter"),
          (jump_to_menu, "mnu_battle_debrief"),
          (change_screen_mission),
(else_try),
...

With this loop ends, battle was going to start. But it throws this rgl error.
 
HyperCharge said:
Do you know why is this coming ?

v5Zn5O.png

you have a operation somewhere like this

Code:
(neg, .....)

Code:
neg          = 0x80000000  # (neg|<operation_name>, ...),
                           # Used in combination with conditional operations to invert their results.
as neg = 2147483648

so search your modules for that mistake, as this operation must be used to negate another, it can't be used alone
 
Status
Not open for further replies.
Back
Top Bottom