Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I think you messed up a tuple in module scenes.  Something like this:

("town_9_tavern",sf_indoors,"oim_interier_rus_taverna", "bo_oim_interier_rus_taverna", (-100,-100),(100,100),-100,"0",100,
    ["exit"],[]),

Problem is the last ,100 shouldn't be there.  I tried a lot of other stuff to try to get the same error and the only thing that produced it was this.

Look familiar?
MODULE `scenes` ERROR:
Traceback (most recent call last):
  File "compile.py", line 198, in <module>
    get_globals()[entity_name] = check_syntax(get_globals()[entity_name], [entit
y_def['parser']], entity_def.get('uid', 0))
  File "\mb_wfas_module_system_1143\WFaS Module_system
1.143\compiler.py", line 1619, in check_syntax
    output.append(check_syntax(entity[index], parser[0], uid))
  File "mb_wfas_module_system_1143\WFaS Module_system
1.143\compiler.py", line 1598, in check_syntax
    output.append(check_syntax(entity[index], subparser, uid))
  File "mb_wfas_module_system_1143\WFaS Module_system
1.143\compiler.py", line 1617, in check_syntax
    for index in xrange(len(entity)):
TypeError: object of type 'int' has no len()


COMPILATION FAILED.



edit:  this also causes it:
("town_9_tavern",sf_indoors,"oim_interier_rus_taverna", "bo_oim_interier_rus_taverna", (-100,-100),(100,100),-100,"0",
    ["exit"],100,[]),
 
Prater said:
I think you messed up a tuple in module scenes.  Something like this:

("town_9_tavern",sf_indoors,"oim_interier_rus_taverna", "bo_oim_interier_rus_taverna", (-100,-100),(100,100),-100,"0",100,
    ["exit"],[]),

Problem is the last ,100 shouldn't be there.  I tried a lot of other stuff to try to get the same error and the only thing that produced it was this.

Look familiar?
MODULE `scenes` ERROR:
Traceback (most recent call last):
  File "compile.py", line 198, in <module>
    get_globals()[entity_name] = check_syntax(get_globals()[entity_name], [entit
y_def['parser']], entity_def.get('uid', 0))
  File "\mb_wfas_module_system_1143\WFaS Module_system
1.143\compiler.py", line 1619, in check_syntax
    output.append(check_syntax(entity[index], parser[0], uid))
  File "mb_wfas_module_system_1143\WFaS Module_system
1.143\compiler.py", line 1598, in check_syntax
    output.append(check_syntax(entity[index], subparser, uid))
  File "mb_wfas_module_system_1143\WFaS Module_system
1.143\compiler.py", line 1617, in check_syntax
    for index in xrange(len(entity)):
TypeError: object of type 'int' has no len()


COMPILATION FAILED.



edit:  this also causes it:
("town_9_tavern",sf_indoors,"oim_interier_rus_taverna", "bo_oim_interier_rus_taverna", (-100,-100),(100,100),-100,"0",
    ["exit"],100,[]),
i checked that before i posted and that doesn't seems to be the problem
PS maybe because i assigned chests that doesn't exist yet like this as an example
Code:
.............ect

("castle_197_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000056c3da200003a0e6000002a900002d7a0000409e",[],[],"outer_terrain_desert"),
("castle_197_interior",sf_indoors, "arabian_interior_keep_b", "bo_arabian_interior_keep_b", (-100,-100),(100,100),-100,"0",["exit"],["castle_37_chest"]),
("castle_197_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0",[],[]),

("castle_198_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000056c3da200003a0e6000002a900002d7a0000409e",[],[],"outer_terrain_desert"),
("castle_198_interior",sf_indoors, "arabian_interior_keep_b", "bo_arabian_interior_keep_b", (-100,-100),(100,100),-100,"0",["exit"],["castle_37_chest"]),
("castle_198_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0",[],[]),

...............ect
the ["castle_37_chest"] doesn't exist (still didn't make them ) should i try replacing the chest number with the nulber that exist)

that might sound stupid or not but that's me when i'm in a bad situation >~<
 
Honestly you should just replace those chest troops altogether - most people will be using the household inventory anyway. Native has had that bug for the longest time and nobody complained.
 
If it doesn't exist yet, I get a troop undefined error.  Something else is the cause.  I am fairly certain that you have a number someplace it shouldn't be, otherwise you'd get a different error.  If it was because you put in "castle_37_chest", you would get a "unhashable type: 'list'" error.  You have an integer, such as 100, placed in the wrong spot.  You are getting a python error, not a module system error, which means the syntax is messed up.  You have a lot of scenes, are you sure you've gone through them all?  One way to find out which line is causing the problem would be to rename your module scenes, put the vanilla module scenes in your source folder, and copy and paste each edited scene in and compile until you get the error again.  Sucky work, but might be the only way to find out which scene is causing the problem.

 
Im making zombies for a pw mod, but they attack each other. How do you fix this so they are friendly to each other? I tried:

Code:
(team_set_relation, "fac_zombies", "fac_zombies", 1),

and

Code:
(set_relation, "fac_zombies", "fac_zombies", 1),

and it wont work
 
So I'm trying to get the map from one verison of 1257ad into another version of 1257ad.  I cannot get either map to load in the Map Editor, I can get the Native map to load.

It seems that thorgrims wants parties, map, and map icons to edit.

Adjusting the size of the map in module.ini made a difference, and copying parites over changes the map perfectly but the ownership is wrong, with Russia owning land in England, etc.

What else do I have to change to get the correct countries owning the correct fiefs?

Or is there a way to get the map loaded into​ The editor that I'm missing?


 
Ramaraunt said:
Im making zombies for a pw mod, but they attack each other. How do you fix this so they are friendly to each other? I tried:
PW uses a bunch of hacks related to player and agent teams to work around the hard coded multiplayer limit of two, which has implications for bots (which the mod was not designed for). See these threads in the PW modding board:

Basic code
Background information

As kalarhan said, factions (starting with fac_) in the module system are not teams, and they are only really used in single player. Multiplayer modes just spawn agents (from troops) into teams; there are only 3 possible values for a player's team (0 = spectator, 1, and 2), and 8 possible agent team values (0, 1, 2, 3, 4, 5, 6, 7 = hard coded neutral no attack, from memory).
 
talvas said:
Or is there a way to get the map loaded into​ The editor that I'm missing?

do you have the mod source (modsys)? Or are you trying to change things with .txt only? The first option is easier, the second can be easy, hard or close to impossible depending on what you want to change.

for example: both maps have different sizes (by your description), but what does that mean? Does one map cover more geography, or they have different scales? Does one map have different number of parties (towns, villages, ... ) than the other?
 
Hello!

This might be the stupid question but I really need to know the answer. How can I play permament specific music in the specific scene?
I tried using play_track operation and the music started playing but ended up in like 2 seconds after that. Sorry for my poor English :mrgreen:
 
kalarhan said:
talvas said:
Or is there a way to get the map loaded into​ The editor that I'm missing?

do you have the mod source (modsys)? Or are you trying to change things with .txt only? The first option is easier, the second can be easy, hard or close to impossible depending on what you want to change.


for example: both maps have different sizes (by your description), but what does that mean? Does one map cover more geography, or they have different scales? Does one map have different number of parties (towns, villages, ... ) than the other?

The maps are exactly the same, it's the scale that's different.  One is more spread out and seemingly much larger.  It's the fact that they are virtually identical that made me think this would be simple.

One mod seems to have 10 more mapicons and maybe half as many parties.  (1296 at the top of one parties, and 890 or so at the top of the other.). All entries are roughly the same, except that in one file the names are things like map_town_a and the equivalent in the other file is gulltown,  but may others are the same with only the number values altered.

I can possibly ask for the source, but right now I only have the texts.
 
talvas said:
I can possibly ask for the source, but right now I only have the texts.

then you should forget about using other version locations, and just scale the maps to the same area by using a 3D program. Or move the parties you have on the other map (new coordinates), which would be a lot of work.

Why do you want to use another map anyway? Do they have different quality? You won't be able to do much with it without the source.

 
The other map is much nicer, more hills and wider spaces. I had also heard that it gives smaller factions a chance to fight and take fiefs since the large factions can't mobilize as quickly.  It would be a really nice change of pace.

I've been trying to get it to load in the map editor but the editor won't start.  I followed the directions and dropped the map, map icons, and parties into the native folder but it doesn't run.  It does load the native warband map when I want it to do that.

I found the old tutorial from 2005 lol and followed it to the letter.  I even changed the max size hoping it would help but no luck.  I'm guessing I must be missing the height setting?

Is there a better one than Thorgrim's for warband specifically? 
 
talvas said:
I've been trying to get it to load in the map editor but the editor won't start.

check the Tool thread and post your issues there, include all info you can (any error message, log file, etc), as "won't start" is a very generic description.

if you get the modsys (or reverse engineer the module_parties.py) you could use Cartographer.

someone may recommend other tools as well.
 
Where do troops get automatically assigned to "types" upon recruitment.
Players are complaining that most of their new recruits have type "unknown."
I have been scouring the code looking at _cavalry and sdt_cavalry, but I can't find it.
I am using Brytenwalda Source, but have been looking through VC code for this as well.
 
gdwitt said:
Where do troops get automatically assigned to "types" upon recruitment.
Players are complaining that most of their new recruits have type "unknown."
I have been scouring the code looking at _cavalry and sdt_cavalry, but I can't find it.
I am using Brytenwalda Source, but have been looking through VC code for this as well.

I believe flags guarantee_horse and guarantee_ranged define the classes internally
 
If you want to set it yourself, there is this

Code:
troop_set_class                          = 1517  # (troop_set_class, <troop_id>, <value>),
                                                 # Sets troop class (infantry, archers, cavalry or any of custom classes). Accepts values in range 0..8. See grc_* constants in header_mission_templates.py.

 
Status
Not open for further replies.
Back
Top Bottom