Opened 9 years ago
Last modified 7 years ago
#3102 closed enhancement
[PATCH] Map modification: Survival of the Fittest — at Version 32
Reported by: | NiAypa | Owned by: | NiAypa |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 22 |
Component: | Maps | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
Hello,
I have just modified the random map "Survival of the Fittest".
Here is a link to the forum post
What I changed:
Waves now have different unit types (and strength), more are added as waves are coming
- The first wave spawns at 5 minutes now instead of 10
Treasure seeker women now respawn when killedimplemented as invincible woman.
Disabled the corral
- Treasures now spawn more frequently & more randomly, also more treasures are spawned
- More info messages are now displayed
More detailed description for the new waves:
The waves can now contain of Infantry, Champions, Elephants, Healers, Siege Units, and Heroes. As more waves are coming, more unit types will be attacking, and their share changes. I guess this is quite unbalanced still, since I did not yet have the opportunity to test well, since this map is supposed to be played with 4 Players.
Im still working on it, but I think it can be tested now especially for balancing So I open this ticket to hope more people can test that way (Im quite confused but testing from SVN would be the point).
I highly appreciate any feedback :)
And I hope, of course, that it will be included in Alpha 19
Change History (47)
by , 9 years ago
Attachment: | SurvivalOfTheFittest_NiAypa.zip added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Owner: | set to |
---|
comment:3 by , 9 years ago
I have attached an update with the following changes:
- Number of treasures changed
- Players who are defeated, and empty slots now cause less treasures to spawn (not yet working for the first two spawns)
- Balanced the waves (Feedback pls)
- Added a little more resources later in game
- Fixed a bug in the treasure spawn, that made treasures be unequally spawned
by , 9 years ago
Attachment: | SurvivalOfTheFittest_NiAypa_2.zip added |
---|
Survival of the Fittest modified map files. Unpack to 0ad/binaries/data/mods/public/maps/random
comment:4 by , 9 years ago
Some code comments:
- You should incorporate the changes from r16444. (I guess you were developing this against alpha 18, you should really develop it against SVN though (makes it easier to include, and less updating needs to be done in case something changes))
- Leave the warning about AI players at the start of the map description.
- Code style (also see the coding conventions)
- The indentation for arrays is a bit much, just use something like
var treasures = [ "gaia/special_treasure_food_barrel", "gaia/special_treasure_food_bin", "gaia/special_treasure_food_crate", "gaia/special_treasure_food_jars" ];
- In objects quote the value name
{ "foo": "bar" }
- One space between
if
and(
(also forfor
). - For
if
s andfor
s with just a single line of code in it omit the braces. - Adding methods to the prototype should have a
;
after the closing}
of the method (Also see r16444). switch
-case
indentation.
- The indentation for arrays is a bit much, just use something like
startEnemyWave()
andwaveAttackers
could likely be simplified by using an object to store the counts and a function to calculate those counts, then looping over those object keys and adding units that way.- In
MarkUnassignedPlayers
in the secondif
you could just assign a pre-made object. Instead of doingfoo = {}; foo.bar = baz; foo.bla = 2;
do something akin tofoo = { "bar": baz, "bla": 2 };
- I18n is completely broken. See Internationalization.
- Do not concatenate strings that should be translated. Use sprintf, or in this case just
markForTranslation()
the string with the format specifier, and then pass the parameter along. - Remove
TimeString
and use time/date formatting for this.
- Do not concatenate strings that should be translated. Use sprintf, or in this case just
- Naming of functions and variables can be improved (eg
TalkToPlayers
would be a lot nicer asNotifyPlayers
) - Use an consts instead of strings for the cases (and the parameters you call it with) in
TalkToPlayers
.
(Not an extensive review, but those should be fixed anyways.)
The ideas on how to improve it implemented in there are quite nice.
comment:5 by , 9 years ago
Component: | UI & Simulation → Maps |
---|---|
Keywords: | review added; Survival of the Fittest Trigger random removed |
comment:8 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
If you want I can make an a18 patch from those three javascript files, so that it might be easier to review and update the map to svn.
comment:9 by , 8 years ago
Keywords: | patch added |
---|
comment:10 by , 8 years ago
Milestone: | Alpha 20 → Backlog |
---|
comment:12 by , 8 years ago
Keywords: | review added |
---|---|
Summary: | Map modification: Survival of the Fittest → [PATCH] Map modification: Survival of the Fittest |
comment:14 by , 8 years ago
Keywords: | map review removed |
---|
by , 8 years ago
Attachment: | t3102_survival.diff added |
---|
rebased still interesting parts of proposed changes
comment:15 by , 8 years ago
Description: | modified (diff) |
---|---|
Keywords: | review added |
Milestone: | Backlog → Alpha 21 |
patch includes:
- respawning woman,
- more random treasures (place and time),
- more info messages,
- trickle resource after some time
comment:16 by , 8 years ago
Keywords: | review removed |
---|
Thanks for working on this, but there are a number of points I disagree with, see comments http://irclogs.wildfiregames.com/2016-06-24-QuakeNet-%230ad-dev.log from 11:13-11:30.
by , 8 years ago
Attachment: | t3102_survival_2.diff added |
---|
comment:17 by , 8 years ago
Included comments
only a ceasfire or dplo states would be as much of a workaround as respawning. Making the woman invulnarable and undeletable seems a better option.
comment:18 by , 8 years ago
Keywords: | review added |
---|
follow-up: 20 comment:19 by , 8 years ago
(just formal quick stuff extra space l227 new empty line l71 you can let the comma at end of array what happens if we add starting females not in middle ?)
comment:20 by , 8 years ago
Replying to fatherbushido:
you can let the comma at end of array
I know, but hate it
what happens if we add starting females not in middle ?)
Implemented a little workaround: seeker woman need to have lower ID then other woman (what I guess can be assumed)
comment:22 by , 8 years ago
- Not sure whether the balancing is fine. Especially if one can't build fields nor corrals. That seems like a new change as I recall people having food income and selling that at the market. If we want to prohibit economy, markets should be prohibited as well (though not sure why we would want to prohibit food and trade economy). Neither sure that the provided resources + treasures are enough to build anything. Didn't playtest.
- If that comment is still accurate, the waves are not becoming strong enough:
A soldier for each 2-3 minutes of the game. Should be waves of 20 soldiers after an hour
It should be an exponential, not a linear increase.
IsUndeletable
/this.undeletable
change was broken, you have to compare against the string- Using a loop for the resources
- Invincible units should become unattackable, likely not easily doable.
let attackerEntity of attackerEntities
should use.map
- Some of the comments should rather be removed than correcting the case
// Place the treasures this.PlaceTreasures();
- Inlining that
ProcessCommand
object and removing that undefined value - Those defaults should be at the top of the file
seekersNumber
-> not sure if we need that- Should we just use trigger points
A-K
instead of deviating from those 3? Your code moves them up to23
tiles away while the trigger points are placed instayClasses(clLand, 5)
, so that might be out of range unless I'm mistaking the unit. - Renaming to
resourceMessage
and making that bool. Check if only one player remains. He will be the winner.
that should be unneeded as of r18441 or one of those endgamemanager/last-man-standing changes (#3970)
by , 8 years ago
Attachment: | t3102_survival_4.diff added |
---|
rebased and fixed a good number of the things mentioned
by , 8 years ago
Attachment: | t3102_survival_6.diff added |
---|
merge random number functions, make resource amount and other consts an interval too and don't create enemy's for non active players.
by , 8 years ago
Attachment: | t3102_survival_6.2.diff added |
---|
comment:23 by , 8 years ago
The number of occurances of shuffleArray(foo)[0]
is significant and more and more occurances are being added, as it's a usual task to pickRandomElement
. IMO there should be a function for that, right below shuffleArray
. Then it could also save some performance by using randInt
instead of randomizing the entire array.
by , 8 years ago
Attachment: | t3102_survival_9a.diff added |
---|
cleanup chatHelper (let it use pickRandomElement). All calls of randInt needs to be checked and updated to the new system, but this will be a separate patch.
comment:25 by , 8 years ago
Milestone: | Alpha 21 → Alpha 22 |
---|
comment:31 by , 7 years ago
Keywords: | review removed |
---|
Review: attachment:t3102_survival_7b.diff:
- I really didn't like seeing
Engine.DestroyEntity
. Errors shouldn't be corrected after they occured but become prevented in the first place. As seen in the commit above, the attacker wave code also did pointless loops.
- Not too happy about the
structures/brit_crannog
part. If you want to disable templates that can't be built in the first place, check #4229. Rotary mill would rather fit there.
foundSeeker
-> not sure how you got there, since the rms only places one woman
minutes = 60 * 1000
the second term seems easier to grasp than the variable name (as the latter requires a lookup)
- For this ticket I order a separate cleanup patch for the time intervals, one for the new messages and one for the treasure update (if we really need that. Hannibal Barca suggested to just play with bigger maps)
Random cleanup:
- Please create a separate ticket for the random cleanup.
pickRandom
and a separate patch doing the duplicate random function thing.
comment:32 by , 7 years ago
Description: | modified (diff) |
---|
Survival of the Fittest modified map files. Unpack to 0ad/binaries/data/mods/public/maps/random