Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Antonis said:
Script error on opcode 1671, Invalid Party ID -1, Lino no. 10.
At mission template mst_lead_charge trigger no: 0 consequences.

script error
opcode 1671 -> check header_operations.py to see which operation that is
invalid party id -> passing a invalid value as the parameter. In this case, -1, which does not exist
line no. 10 -> line #10 of that code
at mission templates -> file mission_templates
mst_lead_charge -> template "lead_charge"
trigger no: 0 -> first trigger of that template (remember to count from zero, as in, [0, 1, 2, 3, ...], not starting from one
consequences -> second block of said trigger

find the trigger, find the second block of it (consequences), find the #10 line that is that operations 1671, figure out why you are passing a invalid value. Hint: it is not the one you posted earlier
 
Ok, so, I took a look(it is really quick if someone explains it to you, it seems  :razz:)
Anyway, here's the thing: this error is "made" by this
Code:
(party_get_morale, ":cur_morale", ":agent_party"),
, which is native, on the lead charge. Also, when I remove the new "knock-off horse" trigger, the error message also doesn't appear. So, something in this new trigger "clashes" with the native code, apparently. But what? I mean, there are no global variables used, even the local variables don't have a common name, there party_get_morale operation isn't used. It baffles me. I mean, the issue happens there, no doubt about it, but there shouldn't be an issue.
 
Antonis said:
no doubt about it, but there shouldn't be an issue.

features can clash with each other. It happens when you mess with the code. That is why we need to test not just what we changed, but everything in between.

is your new code messing with spawn operation? Etc.

Simple solution (bad) is to simple add a validation code to that trigger. But that doesnt answer the big question: why
 
Antonis said:
Yeah, I'll check. I suspect that it has sth to do with the 'spawned' horse, that makes it freak out.

if you are creating a horse then you can add a check for that.

Code:
agent_is_human                           = 1704  # (agent_is_human, <agent_id>),
                                                 # Checks that the agent is human (i.e. not horse).
on the trigger that is blowing up

why are you spawning a horse tho? You can just move the soldier to a open team/division, order him to dismount, etc. Are you recreating them on dismount instead?
 
I'm having a weird issue with my Module system, the build_module Isn't working properly by not showing any of the "exporting" texts or errors. When I use the build_module It just opens a cmd window as It should but then nothing happens and after a while this appears
______________________________

Script processing has ended.
Press any key to exit. . .
This Is not an installation problem! I have been using the module_system for a long time and this Is the first time getting any type of error.
 
kalarhan said:
Antonis said:
Yeah, I'll check. I suspect that it has sth to do with the 'spawned' horse, that makes it freak out.

if you are creating a horse then you can add a check for that.

Code:
agent_is_human                           = 1704  # (agent_is_human, <agent_id>),
                                                 # Checks that the agent is human (i.e. not horse).
on the trigger that is blowing up

why are you spawning a horse tho? You can just move the soldier to a open team/division, order him to dismount, etc. Are you recreating them on dismount instead?

Well, to be honest, I figured that I should just move the agents forwards and backwards. Rider back, horse forward. So, to do that, I get the position of the horse the moment the rider gets hit, remove the horse and re-spawn it a bit further. That way, it looks as the rider is on air and he crumbles down to the ground. As I said, it does work and pretty good. But that lousy script error is bugging me. There is a check for agent to be alive and not a horse, btw.
 
Antonis said:
But that lousy script error is bugging me.

? Just add a check on the trigger. You can even do the simpliest thingy like

Code:
         (agent_get_party_id, ":agent_party", ":agent_no"),         
         (party_get_morale, ":cur_morale", ":agent_party"),

Code:
         (agent_get_party_id, ":agent_party", ":agent_no"),    
         (ge, ":agent_party", 0),     
         (party_get_morale, ":cur_morale", ":agent_party"),

and its all gone  :mrgreen:

but you should use the test for [are you a horse] after line 1 (#0), as there is no point checking courage of a horse :grin:

Code:
      (store_trigger_param_1, ":agent_no"),
      # test if agent_no is NOT a horse HERE
 
I'm having a problem where the helmets go off the side of the screen anyone know how to push them down a row?

Example:
mc8Yhf9.jpg
 
gaham1 said:
I'm having a problem where the helmets go off the side of the screen anyone know how to push them down a row?

Example:
mc8Yhf9.jpg

Yes. The easy solution: You do classify them with another item class. I think there are light helmets and heavy helmets in Native, not sure anymore. I have three categories of helmets, multi_item_class_type_light_helm, multi_item_class_type_medium_helm and multi_item_class_type_heavy_helm. Make sure to divide them across this two or three with some sense and you should be fine. Be aware that you need to declare an additional one or two, in case there is only one or maybe two. You find them in header commons. Make sure each number there is only used once. You can just push in between another helmet variant and bring the number in order again.
 
Thank you so much!


Another question I set the bots on each side to 100 but if there are 2 players on one side and only 1 player on the opposing side the first side only spawns with 50 where do I go to disable that balancing?
 
gaham1 said:
Thank you so much!


Another question I set the bots on each side to 100 but if there are 2 players on one side and only 1 player on the opposing side the first side only spawns with 50 where do I go to disable that balancing?
Hm, I haven't had that problem yet, at my side there always spawned the same amout of bots at both sides. But you have also a huge amount of bots, so maybe try it again with only 50 for each side.
 
Hello community.
I have added new skin replacing undead skin.Unfortunately, the new skin is a woman, and the game treats her as a man. How can you fix this? I am using the Floris Expanded 2.53 module.
 
Antar36 said:
the new skin is a woman, and the game treats her as a man

you need to check how your module handles gender on dialogs/menus/etc.

Native uses a simple rule: skin #0 is man, skin #1 is female

Code:
troop_get_type                           = 1506  # (troop_get_type, <destination>, <troop_id>),
                                                 # Returns troop current skin (i.e. gender).

a example
Code:
       (troop_get_type, ":is_female", ":recruitment_candidate"),
       (str_store_string, s45, "str_he"),
       (str_store_string, s47, "str_king"),
		
       (try_begin),
         (eq, ":is_female", 1),
         (str_store_string, s45, "str_she"),
         (str_store_string, s47, "str_queen"),
Code:
                     (troop_get_type, reg65, "$g_talk_troop"),
                     (try_begin),
                       (faction_slot_eq,"$g_talk_troop_faction",slot_faction_leader,"$g_talk_troop"),
                       (str_store_string,s64,"@{reg65?my Lady:my Lord}"), #bug fix
Native will not work with more than 2 (0 and 1).

as you added a new skin (which ID is #2) the game would consider it as default (male), unless  you change the game code. There are modules and even OSP that extend it to multiple races/skins. Check how yours do it, maybe all you need to do is move it to ID #3 ...

 
I'm sorry, but I don't really understand what you mean. I am using floris module with Diplomacy modem. There, the dialogues are slightly differently solved. Above all, however, these lines of code are the system module, right?
I'm just learning how to mod. For now I only cover a little bit openbrf and copy from txt. I could introduce the undead based on the instructions. For a woman's skin, I just copied it from PoP to skin.txt in Floris. Of course, I know that all my alterations are for my own use only and I cannot distribute them without the consent of the creators of these mods.
 
I have a question if I can change conversaton txt files. and string, txt, so that the new breed has the attributes of a woman? I don't have experience with module.system, I don't even know what to look for. For example, in diplomacy there is a record about running a diplomacy consequence script, if there is one there then refers to skin? I don't want to be a parasite that preys on others. However, I would like to do what I care about. I still have one question whether there is a module. A fantasy fashion system. Sorry, but I can't find it would help a bit.
 
Antar36 said:
I'm sorry, but I don't really understand what you mean. I am using floris module with Diplomacy modem.

one step at time

1) decide if you want to work only with .txt (which limits what you can do) or you want to learn how to use the modsys (can do anything, but takes a lot of work)
2) when talking about your base module you need to provide the version and the download link you used. There are so many different versions of Floris around that just makes it impossible to figure out which one you are using without that
3) Native is used as the reference because everyone has it. As you are using something else then you will need to wait for someone that has the exact same version OR look for the things yourself. You shouldnt expect people to go deeper on code bases tho, as this is usually considered the responsibility of the modder (your game, your job)
4)
Antar36 said:
however, these lines of code are the system module, right?
yes they are examples from Native (the Warband game we play) that demonstrate how skins are used to determinate gender (first skin has ID=0 and game takes it as male, ...)
5)
Antar36 said:
I could introduce the undead based on the instructions. For a woman's skin
on Native, file header_troops,
Code:
#Troop flags
tf_male           = 0
tf_female         = 1
tf_undead         = 2
undead is disabled (not used). So Native never considered it on its code. As 2 is not 1 it would be considered a male skin. That is why mods with multiple skins needed to change how dialogs, menus, etc, work with gender. A common pattern is to [even number is male]  and [odd number is female].

You need to check (or wait for someone to do that) how it works on your module

6)
Antar36 said:
I have a question if I can change conversaton txt files. and string, txt
changing .txt is a nightmare, not impossible, but harder than modsys at this point. You should do (5) first as the solution could be as simple as just add a male and female undead skins instead ...

7)
Antar36 said:
I don't have experience with module.system, I don't even know what to look for
that is why the Forge has tutorials
https://forums.taleworlds.com/index.php/topic,240255.0.html

keep in mind that Floris has its own way of doing things, which includes how the files are distributed on folders, and you will need to read that module help texts as well.
 
Status
Not open for further replies.
Back
Top Bottom