View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0020052 | AI War 2 | Bug - Other | Aug 30, 2018 6:54 am | Sep 5, 2018 3:48 pm | |
Reporter | RocketAssistedPuffin | Assigned To | Chris_McElligottPark | ||
Status | resolved | Resolution | fixed | ||
Product Version | 0.763 Supersized Ship Caps | ||||
Fixed in Version | 0.766 Target Equilibrium | ||||
Summary | 0020052: If a merc unit has a spawn on death effect, triggers a dopersecond logic error | ||||
Description | The unit causing is is my Automated Construction Bots, who spawn 10 of themselves upon death, like Hydras. Error pops when the effect is used. The weird thing is...they work fine. They act exactly as they should, after a small delay upon spawning. (This bug might be caused by this, so putting it here: A data center grew engines and slowly tried to sneak away. It hasn't occured before this error and seems to start when it pops. How a logic error causes a center to move...baffling. A forcefield also became invincible at 0% health and the mercs crowded it, not moving past). This group can just be left out until it's fixed. | ||||
Tags | No tags attached. | ||||
related to | 0020139 | resolved | Chris_McElligottPark | Long range planning error with Mercenaries |
|
|
|
Hey Chris, does GameEntityCategory.Ship now include turrets? I've also observed some minor faction units moving. I do have code that makes (say) marauder ships appear to patrol a planet; the code iterates over all the GameEntityCategory.Ship units, and if there's no fighting it makes them patrol a planet. I've seen some turrets also attempting to patrol; it's very thoughtful of them to help, but that's not really what I had in mind |
|
There was an Ion Cannon that started to move as well. The entire entity, not just the icon. They both moved towards the bottom left of the planet. |
|
There was a bug in GetSpeed() that was making it so that ships could all move as part of my fix to the gravity issue. Fixed that now. That said, Ships has always actually included turrets and other structures -- it means "anything that's not a shot or wormhole," basically. If you want mobile ships, then I think there's a rollup called MobileCombatants or something like that. |
|
Thanks! * Protections and logging have been put in that should solve the problem of nullref exceptions after a mercenary unit spawns another mercenary unit on death. ** This hasn't been tested, so if it still breaks in the next version then we'll need a savegame, but that wasn't possible prior to now. |
|
This is still here, but it took longer to trigger, instead of on the very first instance the Hydra effect occurs. Save with the responsible units on planet "Alpha" already purchased and waiting to break stuff. |
|
Hey Chris, so this bug is definitely still happening. It's caused by the fact that when the "hydra" units spawn Construction Bots, those construction bots don't have MercenaryUnitData or a Mercenary Group applied to them. Since the SpawnOnDeath code is done in the Core code, it has no knowledge of External Data that might need to be duplicated from the original entity to the newly spawned entites. So when we try to check which Mercenary Group the new Construction Bot is in, it doesn't have a group and so it explodes. The most obvious fix is to the Mercenary Data information into Core code, then account for that when spawning the new units, but I don't really like that solution so I'm going to throw this one to you. Edit: Now that I look at this code again it looks pretty different, so I'm no longer 100% confident about this assessment |
|
Got it, thanks guys -- I can fix this now that I have a repro case. I specifically don't want to move the mercenary code into the main project because then it goes closed-source AND we lose an example of how to mod in something cool. I had a solution in mind for this, which I attempted without having a repro case, but that clearly didn't work. I'll have to be a bit more aggressive here, but that's ok. |
|
Could comment the group out for now - I made it for a thematic reason to try the Hydra effect - in the worst possible way apparently! If we really want the Hydra effect still in use, I could just make a new fleetship for it. If it'd work for the human and AI at least. Though...Nanocaust could infect one as well. That'll be really weird? |
|
Thanks! * Added a new DoOnSpawnsOnDeath method on the scenario and on the special faction implementations. This allows us to have central logic, or per-faction logic, for when an entity is spawned via another entity dying. ** We're now using this on when a mercenary does this in order to copy to mercenary group affiliation from the parent to the child, thus preventing errors that otherwise happened. |
Date Modified | Username | Field | Change |
---|---|---|---|
Aug 30, 2018 6:54 am | RocketAssistedPuffin | New Issue | |
Aug 30, 2018 6:54 am | RocketAssistedPuffin | File Added: ArcenDebugLog.txt | |
Aug 30, 2018 10:10 am | BadgerBadger | Note Added: 0048586 | |
Aug 30, 2018 12:22 pm | RocketAssistedPuffin | Note Added: 0048601 | |
Aug 30, 2018 9:36 pm | Chris_McElligottPark | Note Added: 0048644 | |
Aug 30, 2018 9:55 pm | Chris_McElligottPark | Assigned To | => Chris_McElligottPark |
Aug 30, 2018 9:55 pm | Chris_McElligottPark | Status | new => resolved |
Aug 30, 2018 9:55 pm | Chris_McElligottPark | Resolution | open => fixed |
Aug 30, 2018 9:55 pm | Chris_McElligottPark | Fixed in Version | => 0.764 Mercenary Surge |
Aug 30, 2018 9:55 pm | Chris_McElligottPark | Note Added: 0048645 | |
Aug 31, 2018 1:57 pm | RocketAssistedPuffin | File Added: DoPerSecondError.save | |
Aug 31, 2018 1:57 pm | RocketAssistedPuffin | File Added: DoPerSecondError.savemet | |
Aug 31, 2018 1:57 pm | RocketAssistedPuffin | Note Added: 0048666 | |
Sep 2, 2018 12:42 am | BadgerBadger | Status | resolved => feedback |
Sep 2, 2018 12:42 am | BadgerBadger | Resolution | fixed => reopened |
Sep 2, 2018 12:42 am | BadgerBadger | Note Added: 0048713 | |
Sep 2, 2018 12:42 am | BadgerBadger | Status | feedback => assigned |
Sep 2, 2018 12:43 am | BadgerBadger | Note Edited: 0048713 | |
Sep 5, 2018 9:00 am | BadgerBadger | Relationship added | related to 0020139 |
Sep 5, 2018 10:33 am | BadgerBadger | Note Edited: 0048713 | |
Sep 5, 2018 2:14 pm | Chris_McElligottPark | Note Added: 0048864 | |
Sep 5, 2018 2:36 pm | RocketAssistedPuffin | Note Added: 0048872 | |
Sep 5, 2018 3:48 pm | Chris_McElligottPark | Status | assigned => resolved |
Sep 5, 2018 3:48 pm | Chris_McElligottPark | Resolution | reopened => fixed |
Sep 5, 2018 3:48 pm | Chris_McElligottPark | Fixed in Version | 0.764 Mercenary Surge => 0.766 Target Equilibrium |
Sep 5, 2018 3:48 pm | Chris_McElligottPark | Note Added: 0048885 |