Opened 18 years ago
Last modified 8 years ago
#118 new task
[PATCH] Actor variation persistence
Reported by: | Philip Taylor | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
Save the actor variation for entities when saving map files in the editor, and use them when the map is loaded.
Preferably, don't do it too inefficiently: don't store "Idle" for entities; modify the XMB format to have fewer redundant strings; and:
For objects which the designer wants to just be random, perhaps generate the initial variation pseudo-randomly and deterministically, based on a single ID number - then if the map is saved, it only has to save that number and not all the variation strings. (It shouldn't be a new random variation each time you load the map, because that'd be confusing when saving/reloading in the middle of a game and when doing multiplayer). The variation will become wildly different if the actor XML file is modified, but that is not very common and shouldn't matter.
Attachments (3)
Change History (13)
comment:1 by , 14 years ago
Milestone: | Atlas Stage 1 |
---|
comment:2 by , 14 years ago
Milestone: | → Backlog |
---|
comment:3 by , 11 years ago
Description: | modified (diff) |
---|
The last part of this ticket was mostly implemented in r13143, for Atlas entity placement and in-game construction. Still need to generate random seeds for:
- unit training - so that e.g. the first unit you train doesn't always look the same on the same map (currently tied to entity ID instead). How to handle batches?
- wall construction - not as important, they don't have much variation?
Selection strings are still TODO.
by , 9 years ago
Attachment: | variations.diff added |
---|
by , 9 years ago
Attachment: | variations.2.diff added |
---|
comment:4 by , 9 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 19 |
comment:5 by , 9 years ago
Summary: | Actor variation persistence → [PATCH] Actor variation persistence |
---|
comment:6 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
comment:8 by , 8 years ago
Milestone: | Alpha 20 → Alpha 21 |
---|
If I'm not wrong, that doesn't follow Philip's recommendation to not do it inefficiently (for all units there will be a variation string saved).
The CUnit* unit = cmpVisual->GetUnit();
should go inside the if (cmpVisual)
.
I think this is dangerous to include a change to the map loading and saving now. However, if I'm wrong on the efficiency matter, it should be committed right after the release. Leaving the review tag for that reason.
comment:9 by , 8 years ago
Keywords: | review removed |
---|
You need to be able to store partial variations, and let others depend on the seed. So the else on line 1097 shouldn't be there.
And I agree with Itms that the variations shouldn't be written to the map automatically, but that Atlas should provide a way to set them explicitly.
Milestone Atlas Stage 1 deleted