Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Structure limit warning on home maps for non-players #4743

Closed
wzdev-ci opened this issue Feb 12, 2018 · 12 comments
Closed

Structure limit warning on home maps for non-players #4743

wzdev-ci opened this issue Feb 12, 2018 · 12 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Berserk Cyborg


For some reason warzone warns about an AI player having too many X on map (see setCurrentStructQuantity() in structure.cpp). Only shown on home maps where the enemy has an HQ or command relay. Does not affect gameplay from what I have seen.

example output:

info    |04:22:15: [setCurrentStructQuantity:606] Assert in Warzone: structure.cpp:606 (asStructureStats[inc].curCount[player] <= asStructureStats[inc].upgrade[player].limit), last script event: '<none>'

Now, this does not happen on the first encounter of a mission with such structures, but every one after that will show the above warning.

On the below save the AI does not have any structures (aside from those it absorbs) on this mission. And donateObject() will bail on donating HQ/relays/factories to that player (Nexus in this case) since the counts are too high.


Issue migrated from trac:4743 at 2022-04-16 13:02:56 -0700

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file Gamma4.zip (65.5 KiB)

Use "let me win" cheat when offworld

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> committed [530]


In Warzone2100/warzone2100@530d67a:

#CommitTicketReference repository="" revision="530d67a8b74025187edf80139edbd40bbfc4293a"
Fix more visibility asserts in campaign

Should not have visibility data in droids on
board a transporter, but these were created when
a game was loaded with droids already boarded.

Should not try to check for visibility toward the
campaign transporter, since it can be off-map and
off-map coordinates are crashy.

See #4743

@wzdev-ci
Copy link
Contributor Author

Per commented


I don't even get that far. It asserts so much on the way. This savegame is goldmine of reproducible bugs...

Current bug is that the landing zone coordinates for the AI player (player 3) on the map we go to are off-map, which causes an assert when the VTOLs want to fly to rearm to this off-map location. Are they supposed to fly off-map? (Not sure if the our current code expects that any non-transporter goes off-map.)

@wzdev-ci
Copy link
Contributor Author

Per commented


It uses the landing zone info from the savegame (setNoGoArea(47, 52, 49, 54, 3)). The landing zone info for the current player is overwritten from the scripts when going off-world, but the landing zone info for the AIs is kept unchanged, which I think is a mistake here.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


There is no rearming for the hit-and-run VTOLs (at least now anyway). They are created on a position coordinate, do whatever they do, then fly toward an area event and get removed when damaged enough or have no ammo.

Lots of MapTile asserts (easy to see with this save) cause the transporter gets pulled away from where it is trying to get to (cause it left the home map in different direction) and thus goes far off map for a while. It also happens upon disembarking the droids (revealing features?).

VTOLs can cause mapTile asserts when they turn around near an edge of a map and go off the map bounds for a little while.

And fpath errors also.

@wzdev-ci
Copy link
Contributor Author

Per commented


The script needs to set a valid landing zone for the player that owns these VTOLs. The mapTile and fpath asserts come because the landing zone they are trying to reach is invalid.

@wzdev-ci
Copy link
Contributor Author

Per commented


The structure limit issue happens because as the transporter enters the new area, the scripts set the structure limit for HQs to zero, and does not set it back before exiting.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg committed [8]


In Warzone2100/warzone2100@8e883e8:

#CommitTicketReference repository="" revision="8e883e826fdc6ad41fefae8ab0d70985f8a2d597"
Stop structure limit warning when returning to home map.

Reset structure limits for HQ and command relay, for the player, after every mission end to
stop warnings about too many of them on map. Those structures were limited when going
off-world, but not reset when returning.

Refs #4743.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 17, 2018

Berserk Cyborg commented


Replying to Warzone2100/old-trac-import#4743 (comment:5):

The script needs to set a valid landing zone for the player that owns these VTOLs. The mapTile and fpath asserts come because the landing zone they are trying to reach is invalid.
I created new LZ areas in 8ff55033187ca7fd413756040a576bc5f576b01d and 749af07f8c4b4b093d03d136370cb64ceef7773a for Beta/Gamma which change with each mission.

@wzdev-ci
Copy link
Contributor Author

Per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per changed resolution from `` to fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant