Module System, attacking towns, assertion failure

正在查看此主题的用户

ex_ottoyuhr

Sergeant at Arms
To start with, I apologize for not posting any code examples pertaining to this; if they're necessary, I'll rectify the possibly-copyright-concern-inducing material in my mod and provide a code sample.

Well...

Drawing primarily off of the example of castles in module_game_menus.py or whatever that was, and adding a link to the random-map scene in each town's whatchamacallits in module_scripts.py, I have managed to get to a point where I can display an "Attack City" option if a town is hostile to the player, and initiate a battle between the player's party and the town's party members. However, as soon as the battle loads (and it _does_ load, at least for a half-second or so), I get an assertion error, stating that in Mission.h, line 2386, the assertion "party_no > 0" was false.

I suspect that I may have just neglected to set some flag or fix some fluke of declaration in module_parties.py; if so, I would appreciate it greatly if someone would point this out to me. However, I think there is the possibility that this is a hard-coded fluke of towns in this version of the game; the only persons likely to be able to answer that question are Armagan, Ipek, and co. -- which explains why I've made this post here in Suggestions, which I know they frequent rather often, as opposed to the more uncertain territory of Module Development. However, if this is a known issue or one that modmakers have encountered in the past, and such would be likelier to provide me with useful advice on the subject, I would appreciate it if a moderator would move this to Module Development as appropriate.

Either way, I promise not to make this sort of post a habit... :smile:

Thanks in advance,

Ex_Ottoyuhr
 
From what it sounds like you've done, you're using the mission template for the siege battles. The inclusion of "Mission.h" also indicates a mission template where the error is happening.
There are several routines set up a certain way in the siege mission template to handle AI routing and so forth. For one thing, the scene needs to be set up with the correct entry points which the AI routing uses. I haven't delved into making a new siege scene myself, so there may be other factors involved. You might try switching it to use a regular battle mission template for the time being to see if that works for you.
 
Janus 说:
From what it sounds like you've done, you're using the mission template for the siege battles. The inclusion of "Mission.h" also indicates a mission template where the error is happening.
There are several routines set up a certain way in the siege mission template to handle AI routing and so forth. For one thing, the scene needs to be set up with the correct entry points which the AI routing uses. I haven't delved into making a new siege scene myself, so there may be other factors involved. You might try switching it to use a regular battle mission template for the time being to see if that works for you.

Yeah, that might be it; a regular battle template was more what I was after anyways -- given that I'm using random terrain. Thanks a lot for the advice; I'll see if it works.
 
Hey, Janus: It WORKED!

Thanks a *heck* of a lot. All I needed was to add a "charge" mission type to the "attack town" mission template, and that settled it -- thanks a lot for explaining it. It's one of those dustier corners of the module system -- things that aren't quite adequately documented, and not the most intuitive either. It's not the first such place, either... First thing I'm doing once my project's over is writing the Unofficial Official Module System Documentation... :smile:
 
后退
顶部 底部