#2580 closed defect (fixed)
[PATCH] Civ Specific technologies researchable outside Specific Civ
Reported by: | s0600204 | Owned by: | leper |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 17 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Very few of the civ-specific technologies have a civ requirement set. This means that with the right instruction, it is possible to research a technology intended for use by another civ. Repeatedly.
Example: I start a new single player skirmish, playing as the Mauryans. Using the 0ad javascript debugger (although I could have used the tools on the Developer Overlay), I find the entity id of a building belonging to me. Making sure I have enough resources, I call down the console line and type Engine.PostNetworkCommand({"type": "research", "entity":5482, "template": "persians/persian_architecture"})
, press enter, and my Mauryan building starts researching a Persian technology. And once it finishes, I can then call down the console line and run the same command, and research the tech again, with cumulative effects.
I note that both the mauryan and persian civs have a special_archery_tradition
tech, which adds +10 to the range of archers. It is currently possible to research either or both, on any civ, by using the above technique, giving archers ever increasing range (and ever decreasing max-health). And as special_archery_tradition
seems to affect buildings as well (or did when I experimented), researching this tech a few times means one ends up with towers that may be very weak structurally, but can pick enemy units off at an unrealistically long distance!
I haven't played any multiplayer yet, so I do not know whether it would be possible to do the above whilst playing against others rather than the AI. Admittedly the average player may not have the technical know-how to even start working out how to do the above, and I realise that Engine.PostNetworkCommand()
is not something you might expect a player to use mid-game, but it only takes one malcontent to screw a game up for others.
Possible Solutions:
- Adding a civ requirement to all civ-specific techs (not just the
civbonus_*
techs as is at the moment) would prevent a player from researching techs not intended for the civ they're playing. - As to the ability to research techs repeatedly - this applies to all techs (the cumulative effects from running
vision_outpost
six times in succession gives outposts sufficient line-of-sight to see across half a medium size map - and can be done fairly early in a game). Maybe an array in the player object of the techcodes belonging to the techs a player has already researched, to be checked before research is initiated?
Attachments (2)
Change History (13)
comment:2 by , 10 years ago
Milestone: | Backlog → Alpha 17 |
---|---|
Priority: | Should Have → Must Have |
follow-up: 4 comment:3 by , 10 years ago
I think it's fine to rely on the GUI to check those things. But the developer console should be disabled in rated games.
Note that we also have a cheat to research technologies now, so you don't even need the dev console. (cheats are also disabled by default in multiplayer games).
comment:4 by , 10 years ago
Replying to sanderd17:
I think it's fine to rely on the GUI to check those things. But the developer console should be disabled in rated games.
And what prevents me from modifying the GUI to remove those checks? That would be even easier than using the console. The problem isn't in the console. The simulation has to perform the checks, that way if someone tries to modify that, the game will go OOS.
by , 10 years ago
Attachment: | command.js.diff added |
---|
A check to prevent a technology from being researched more than once.
by , 10 years ago
Attachment: | civReqs_on_techs.diff added |
---|
Add civ requirements to civ-specific techs that don't already have them.
comment:5 by , 10 years ago
Keywords: | patch review added |
---|---|
Summary: | Civ Specific technologies researchable outside Specific Civ → [PATCH] Civ Specific technologies researchable outside Specific Civ |
Please read SubmittingPatches when doing so, thanks.
comment:8 by , 10 years ago
Keywords: | review removed |
---|
Thanks for the patches. I didn't use the one for Commands.js as a tech should only be researchable once, so checking it as a part of the requirements makes more sense IMO.
comment:9 by , 10 years ago
No problem. It's nice to feel like I've contributed, even if its small.
Just one thing, and this is my fault for not realising it earlier, is that the romans/vision_sibylline
tech was created after I posted my patch and thus was not included in the diff. To be consistent, the requirements
value should be altered to include a requirement for the rome
civ. My mistake, sorry. Do you need/want a patch for this?
And thank you for committing even some of my patch work.
Replying to s0600204:
Indeed it is, thanks for reporting this! :)
I guess we are relying on the UI to prevent these cases.
Engine.PostNetworkCommand
is used by the GUI scripts directly to send commands, so we can't do anything about that, but we definitely shouldn't rely on it passing only valid/legal/correct commands. The proposed checks should go in Commands.js or component helper functions it uses, if applicable.Please let us know if you find any more.