Module Development > The Forge - Mod Development
More Python Troubles
Riven:
Who would have thought that there'd be more difficulties with Python?
Anyway, as some of you may know, I'm working on a mod for .751 for a friend who only plays .751. However, I've added a troop to the renamed Reyvadin (and the renamed Wercheg, but we'll focus on Reyvadin despite the fact that Wercheg gets the same problems). When I load up the game, everything works great. Then, I use cheats to get my character to have ungodly amounts of gold (for testing purposes, of course :P) and I go hire all the units in the renamed Reyvadin (renamed to Nightside). That works great. I've now got five Shadowpass Peasants in my army. Then I get into a battle, send my men forward to see how they measure up against river pirates, to check out balance. Perfect--a victory. But some of my men were killed, and it's dangerous wandering around without cannon fodder, so I went back to Nightside to pick up more peasants....
But there weren't Shadowpass Peasants there. Instead, I was faced with three Vaegir Peasants and one Footman. Any idea why, and what I can do to get Python to produce my units instead of Native's?
And one other thing, which I asked in the strangely-dead 'Modmakers Q&A' thread, but, because I created a thread for the above, I figure I might as well post it here, too. Whenever I build_module, I get an error in module_dialogs. I go to check, press Alt+X, and get this statement, as well as Python highlighting the last line in the document: 'EOF in multi-line statement'. How can I fix this? Thank you for your time.
svaucher:
--- Quote from: Riven on January 10, 2007, 05:08:40 PM ---But there weren't Shadowpass Peasants there. Instead, I was faced with three Vaegir Peasants and one Footman. Any idea why, and what I can do to get Python to produce my units instead of Native's?
--- End quote ---
Unless much has changed, tavern troop creation is done in module_triggers.py. It iterates through all the merc party cities of the factions and creates a random amount of troops for it. Make sure you modify the triggers to create the type of troops you want.
--- Quote ---And one other thing, which I asked in the strangely-dead 'Modmakers Q&A' thread, but, because I created a thread for the above, I figure I might as well post it here, too. Whenever I build_module, I get an error in module_dialogs. I go to check, press Alt+X, and get this statement, as well as Python highlighting the last line in the document: 'EOF in multi-line statement'. How can I fix this? Thank you for your time.
--- End quote ---
Haven't modded in a while, but EOF -> end of file. I assume that means you haven't closed a statement.
Riven:
...
:shock:
You've got to be kidding me. I missed End of File? Thanks a bunch for both, though ... now I can stop coddling the Peasants I have :D
Riven:
Sorry for the double-post; I have to be sure someone's going to look. Because I'm shallow like that.
When I do alt-x now in module_triggers, it shows me something I didn't even touch and tells me that my indentation is wrong. Then, though, I 'untabify region', like they tell me to, and get that beep that alerts me that something didn't take, and alt-x brings up the same error. What am I doing wrong?
svaucher:
--- Quote from: Riven on January 10, 2007, 08:04:28 PM ---You've got to be kidding me. I missed End of File? Thanks a bunch for both, though ... now I can stop coddling the Peasants I have :D
--- End quote ---
Does that mean it's resolved?
I don't mean that you missed the EOF. AFAIK, the compiler (build script) tries to match a } for every { and a ] for every [. If by it's missing one, or it will reach EOF and complain about a multi-line statement.
Navigation
[0] Message Index
[#] Next page
Go to full version