Reverse engineering logic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ares |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Imagine you can make an enemy unit/vehicle enter one lab, by mc, hj or simply by walking on an invisible pad.
You are then able to build that kind of unit.
It is natural, complies with RA2YR spirit, complements the spy logic.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #1 |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Beowulf (genkosygin) wrote : | #2 |
As far as I'm aware, this was an ability in Red Alert 2 with the Cloning Vats.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #3 |
Ren, how would this require runtime changes?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #4 |
Well, you would have to enable that *Type to be built by that particular user, which, in my thinking, would require adjusting the requirements in terms of building, the houses it can be built on, etc. - since, for example, an Allied player wouldn't necessarily have a Soviet factory.
If there's an easier way to do it, all the better.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Firefly (firefly) wrote : | #5 |
how about the secret lab logic? does that help?
entering a soviet-factory with an allied engineer would not allow you to build a random unit/building (defined by a certain list) but the building which is entered. here: the factory
prerequisiteove
just my thoughts
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #6 |
Code related to this issue has just been checked in!
Author: DCoder
Location: trunk, r815
Commit contains DLL: Yes
Revision comment:
Related to issue #457 - [Building]
Grinding=yes ; required for now, will probably be improved later
ReverseEngineer
SpyEffect.
[Victim] ; InfantryType/
CanBeReversed = yes/no; defaults to yes, you'll really want to set this to no on engineers and dogs
Objects grinded by this structure will become available to your house while completely ignoring:
- Prerequisite=, PrerequisiteLists and PrerequisiteOve
- StolenTech, both old and new models
- TechLevel
- Required/
but obeying BuildLimit, PrerequisiteThe
When you are the owner of the reversing facility,
- ReverseEngineering any InfantryType for the first time will play EVA_ReverseEngi
- ReverseEngineering any VehicleType for the first time will play EVA_ReverseEngi
- The undo-reversing spy effect will play EVA_TechnologyS
This feature is currently easy to abuse - you can grind your own high level units, sell your Tech Center, and retain the ability to build them. I have not yet made up my mind on how to fix this, and if any ignored requirements should be respected by this system, so your feedback on this is important.
Also, I'd like to hear different ways this should work besides the grinder - Ren suggested that the Chrono Prison should be able to reverse its captives. Adding a magic logics that lets something drive onto a battle lab is a lot of work, you'll have to be content with existing ways of making a unit drive into/onto a building.
Related to issue 457 .
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marshall (m-edward) wrote : | #7 |
Not sure how hard this would be, but I have a vision of an InfantryType using a personal EMP cannon on a Terror Drone, picking up that Terror Drone (Chrono Prison-style), changing image to show the terror drone on his shoulders (probably just a generic backpack), carrying it back to base and depositing it in the Reverse Engineering Facility. AND then they CAN'T build the Terror Drone, but instead get a new stolen tech index satisfied so they can build something else.
Usage case: My UFO mod, humans stun an Ethereal and kidnap it in order to open up Mind Control tech.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
reaperrr (reaperrr) wrote : | #8 |
[Building]
Grinding=yes
ReverseEngineer
[Victim]
CanBeReversed = yes/no
These all seem to work fine.
SpyEffect.
This one I'm not sure. I let a spy (player-controlled, but not player house) enter my Grinder and the build option for the Reverse-engineered unit did not disappear. Can anyone else confirm this?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #9 |
(player-controlled, but not player house)Do other spy effects work in this setup?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
reaperrr (reaperrr) wrote : | #10 |
yes, I tested it again by adding
SpyEffect.
SuperWeapon=
to the same building and the spy did reset the sw timer, but still didn't remove the reversed tech.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
WoRmINaToR (worminator) wrote : | #11 |
@Marshall: Not only would there be a fairly enormous amount of work to put into that (changing the SHP, and not to mention actually drawing the SHP), but the chrono prison logic requires there be Passengers>0 on the unit. Passengers= does not work well with infantry.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #12 |
Code related to this issue has just been checked in!
Author: DCoder
Location: trunk, r817
Commit contains DLL: Yes
Revision comment:
Related to issue #457 - Added logging for SpyEffect.
Related to issue 457 .
SVN: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #13 |
Uh, Reaperr, are you using SpyEffect.Custom = yes? It's required to get any custom effect at all. I added some logging, but can't spot any problems in the code.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
reaperrr (reaperrr) wrote : | #14 |
>>Uh, Reaperr, are you using SpyEffect.Custom = yes? It's required to get any custom effect at all.
ugh, that's what you get for not looking at the manual first >.<
yeah, that solves the problem, works fine now. Sorry, my bad.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
mireazma (mireazma) wrote : | #15 |
For the abuse solution I thought of a few (I'm inexperienced in modding so bare with me):
A. It would have been just perfect to work with enemy only, like with capturing by engineers. This also handles a specific abuse -- allies "borrowing" each others' technology.
B. If it's impossible, then maybe a tech level requirement per unit, so that it's buildable only if the player has a tech building (battle lab), no matter of which side. I think it's fair enough.
C. After all, selling the tech center is not a problem; the rev. eng. facility _is_ a technology canter; the problem arises when you sell _both_ battle lab and rev. eng.
D. Couldn't the rev. eng. facility made like an add-on pad to an existing war factory for units and to a barrack for infantry? Or to a battle lab.
E. Make the rev. eng. facility unsellable.
F. Make it so a limited number of "analyzed" units may be built (like an ammo for building). This would add to game balance because you have to spend money selling and re-building the facility and can't afford not to have it at all times.
G. For this one my intuition says that the service depot logic would help:
You can build a unit only as long as one "specimen" is currently lying on/in the facility. At a second thought, this would place second as a suggestion.
I hope I helped giving an idea.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
WoRmINaToR (worminator) wrote : | #16 |
Perhaps if your country is one that IS listed in the unit's Owner= list then prerequisites apply. If not, then prerequisites do not apply. Since, by westwood convention, the owner= list only includes countries that will build the unit under normal circumstances this shouldn't be a major problem, but people could change this....
Perhaps not the best idea but it's an idea.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #17 |
Mireazma, your option G sounds quite interesting... I'll think about that.
Worm, the Owner= list is already related to the Kennel Hack and the NCO bug, I can't quite make it work for this as well without risking large fuckups somewhere.
I suppose a way to indicate a "prerequisite that is required even after reverse engineering" or "is a substitute to [structure X] for reverse engineering" would help...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
arielby (ariel-bys) wrote : | #18 |
StolenTech maybe?
[FV]
...
StolenTechWhenR
[XFV]:FV
StolenTechIndex=10
Prerequisite=
Or a string StolenTechIndex or something like that.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
WoRmINaToR (worminator) wrote : | #19 |
@DC: Good point, didn't really think about that...
@Alpha: That still wouldn't solve anything. The ReverseEngineering logic already voids prerequisites. Placing prerequisites on the unit defeats the purpose of reverse engineering, and not placing prerequisites does not solve the problem of the possibility to abuse this system by putting your own units in and then selling your battle lab.
Thus, we need to come up with a better way to solve this problem.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marshall (m-edward) wrote : | #20 |
Actually I think Alpha's suggestion would work great.
Just have it so that ReverseEngineering doesn't void the stolen tech requirements but instead can provide stolen tech.
If you want to be able to get the unit from stealing tech or reverse engineering then just have the Battle Lab give the same tech index as reverse engineering gives.
The only thing you wouldn't be able to do with that is (SpyBattleLab XOR ReverseEngineer), just AND/OR.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #21 |
You could, of course, just add GenericPrerequi
That way, a unit could have
[DILDOTANK]
Prerequisite=
GenericPrerequi
And would appear at the appropriate technology level on all sides.
It's completely implausible to require Side A to have a bunch of tech buildings to build a high tech unit, and to allow Side B to build the exact same thing in a cave.
"Hey, look! We reverse engineered the enemy's cold fusion-powered microwave laser tank! Let's hack it together with figs and leaves in our cave!"
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #22 |
That fails when you add a unique prerequisite structure to one side, e.g. RCC for the Robot Tank, or a Nuke Reactor as a prereq for Deso.
Oh, and let's all not forget that the Kennel Hack will complicate this even more.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #23 |
Actually, that is exactly what my example had...GASEXS, the Allied Sex Shop.
The point is, that way, you could at least roughly ensure the overall level of prerequisites is met - e.g. at least a Tech Center for high tech units.
Allowing all objects of all type to be built at all times, no matter what else the users owns, is kinda problematic, imo.
Is it possible to derive appropriate prerequisites from the actual ones?
e.g. for each building in Prerequisite, check if it's buildable by the reverse engineering user, and, if so, keep it as a prerequisite; if the building isn't buildable, check if it's part of any prerequisite group, and if that is the case, add that group to the prerequisites; if neither is the case, drop the prerequisite.
That way, if something were listed as needing NANRCT, NAWEAP and NATECH, the reverse engineered unit would drop NANRCT and ask for Factory and Tech instead.
If all else fails, i.e. if none of the prerequisites can be built or we can't come up with a better solution, we could take the prerequisites of the lowest reverse engineering object in the game.
If it takes Tech to build a reverse engineering facility, then we can assume that's a high-tech skill, and that reverse engineering without high tech facilities wouldn't be possible. Thus, if no other prerequisites are available, the "new" unit should have a prereq of Tech.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
falaka21 (falaka21) wrote : | #24 |
DCoder is Right... When I put my own Hi_Tech units in to the Reverse Engineering Facility, It overrides "Original Prequisites"
But I guess 0.2 comes with this feature all fixed.. Just wait and see,right ? :)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #25 |
No, actually I haven't had the time and inspiration to fix that part yet. Might just leave it as is for now and fix/improve later.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
falaka21 (falaka21) wrote : | #26 |
O.K. You are the boss..We can wait..
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
OmegaBolt (omegabolt) wrote : | #27 |
Thinking about this a bit more...
Maybe the logic requires either UnitAbsorb (meaning it can reverse only vehicles), InfantryAbsorb (reverse only infantry) or Grinding (reverse either). The first two options means the captured unit has to be retained in the engineering vat in order for the player to build them, while Grinding disposes of the unit and still allows construction.
To be honest I don't see a big problem with being able to build an Apocalypse without a Battle Lab, for example. As long as the reverse engineering structure still stands then it should be buildable. That's kind of one of the benefits of capturing units - it acts a tech lab for the stolen technology. This can be balanced with Unit/InfantryAbsorb as then stolen tech can be freed from the building and there's a limited amount of storage as well.
I don't see stealing your own tech much of a problem either. If you capture your own tech, then lose/sell your Batlle Lab you still don't have access to high tech structures and if the engineering lab gets destroyed you lose the units too. If you have the Absorb tags on as well then your gonna need a few of these buildings just to store all your own tech.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #28 |
Supporting OmegaBolt's mechanism.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
narfnin (narfnin) wrote : | #29 |
I was reading this, and had an idea that may be good.
Perhaps when engineered, you get something similar to "StolenXTech" only it's "UnitEngineered=" and then, on some units, the prerequisite could be "EngineeredFrom="
Example:
[MTNKA]
(basic Apoc coding EXCEPT:)
Prerequisite=
EngineeredFrom=MTNK ;Derp
ForbiddenHouses
What do you guys think?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Untrue (untrue) wrote : | #30 |
Just wondering if the Reverse Engineering logic defaults to yes then that means we can reverse engineer other units too like civilian vehicles right?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
modder666 (modder666) wrote : | #31 |
Supporting OmegaBolt's mechanism as the best possible solution.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Chanterier (speederyr) wrote : | #32 |
OmegaBolt's system is probably the best suggestion for this issue.
narfnin's suggestions about EngineeredFrom= stuff also sound good. You could make systems in which you receive certain elements of a unit with this method (like prism weaponry from the Prism Tank) and allow your engineers (let's say you're Soviet) to construct a completely unit based on the prism tank etc.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Professor_Tesla (professor-tesla) wrote : | #33 |
I support OmegaBolt's proposed mechanism for this feature.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
WoRmINaToR (worminator) wrote : | #34 |
For the record, bolt's idea isn't a lot different from the current function, but I agree with his argumentation. I think something a lot of people are forgetting here is the cost of money and time associated with reversing your own units. Assuming stock values for prices, if a soviet player wanted to reverse his apoc tech, he would have to spend $2000 on the battle lab and an additional $1750 for the apocalypse, including whatever the engineering facility costs, which for this we will assume to be $1500. He can sell the lab sure, but he still spent a total of $4250 and that includes the bonus for selling the lab. And if bolt's method is implemented, the lab is still vulnerable to destruction, meaning you can lose the tech still, and don't forget that you are short an apoc tank which you might have needed for the fight.
So in short, this "exploit" is certainly possible, but certainly not worth it. You might as well keep your battle lab.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #35 |
While the suggested additions sound quite cool, implementing them now would delay 0.2 even further, so retargeting to the future.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MT1337 (mt1337) wrote : | #36 |
I'm quite fine with what renegade suggested, it makes perfect sense to me.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #37 |
Tested it with current SW branch. //I know, that's not the best version, but Virus Bones said rev 817, and it was applied to all current branches.
It seems that ReverseEngineer only lifted up RequiredHouses, and Prerequisites still applies to the reverseengineered unit. Bug or feature?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
YR M0ddEr (yr-m0dder) wrote : | #38 |
"Objects grinded by this structure will become available to your house while completely ignoring:
- Prerequisite=, PrerequisiteLists and PrerequisiteOve
I suggest you retest in trunk
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #39 |
Retested in trunk.
Bug applies but source was misidentified.
ReverseEngineer reverses the unit only if it was yours. So Chrono Prisons filled with enemy units won't give you new technology.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #40 |
If you grind the Chrono Prison, you grind the Chrono Prison, thus you reverse engineer the Chrono Prison, and can build the Chrono Prison.
No handling for passengers of any kind was added yet.
Also, how are you going to force non-owned units directly into the Grinder?
You can only control them if you own them, one way or another.
iow: As far as I can tell from the bug report, everything is working as expected at this point.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
OmegaBolt (omegabolt) wrote : | #41 |
Since Chrono Prison'd units are in some kind of temporal prison dimension surely they'd have to be freed in order to be reverse engineered, therefore control would be returned to the enemy and they'd probably just break out of the engineering building. :P
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #42 |
The Chrono Prison passengers aren't controlled by the CP owner, they are still owned by the original owner. Mindcontrolled units can be reverse-engineered.
And it's correct, I can build the Chrono Prison after all.
Oh well... this just means that the purpose I decided to create a Chrono Prison is just not possible. Never mind, then.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #43 |
Depending on Ares's fate, additional features to deal with Chrono Prison passengers will be added in the future.
For now, the interesting question is if this particular feature works bug-free to the extent it was implemented?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #44 |
Passengers and parasites won't be reverse-engineered (I was wrong, it wasn't the owner's problem), except these cases, all works as intended.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renegade (renegade) wrote : | #45 |
Thank you :)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #46 |
Just a bit doc issue related to this. The second NB @ Reverse-Engineer is based upon my first observations, it haven't been updated since.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
OmegaBolt (omegabolt) wrote : | #47 |
Some EVA issues I noticed.
1) First I mind control a unit, reverse engineer it so now I have the tech. I now mind control another of the same unit, and also send that into the reverse engineering grinder and EVA will still say "New technology acquired", despite the fact I've already got the tech.
2) Captured enemy Spies sent into the reverse engineering building will play their infiltration voice and EVA will also announce that technology has been stolen.
Note, if I have SpyEffect.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Bug Importer (bug-importer) wrote : | #48 |
Code related to this issue has just been checked in!
Author: SteelMirage
Location: trunk, r1113
Commit contains DLL: No
Revision comment:
Related to Issue 457: Changed final note, mentioned minor bugs were attached to this issue.
SVN: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
YR M0ddEr (yr-m0dder) wrote : | #49 |
"Captured enemy Spies sent into the reverse engineering building will play their infiltration voice"
Not an Ares bug.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
OmegaBolt (omegabolt) wrote : | #50 |
And why not? Ares enabled this feature in YR, so of course it is an issue Ares should fix.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
AlexB (alexander-b) wrote : | #51 |
Putting things into a grinder is essentially "entering" a building. Spys usually are allowed to only enter enemy buildings, to do agent stuff them. Putting them into your own grinder is an exception to this rule, but the enter voice will play here also. Not saying this is meant to be like this.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #52 |
To clarify more... if a Spy enters into an allied Spyable=yes structure (because it's a Grinder and a barracks at the same time, for example) it'll play it's infiltration sound. This is valid in YR 1.01 as well.
YRM have tested this possibility after I asked him to do so, this is why he stated its a YR bug.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Krozalid (krozalid) wrote : | #53 |
So if the Grinder=yes structure doesn't have Spyable=yes, it won't play the infiltration sound?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #54 |
It won't. But then you can't use SpyEffects, neither.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Krozalid (krozalid) wrote : | #55 |
Dammit. Will this be in 0.2?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #56 |
This is already in trunk.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Krozalid (krozalid) wrote : | #57 |
Quick question, what about Bolt's suggestion? And Speeder's idea sounds good too. Can't you (the devs) impliment it the way they suggested it? Or is it too hard to do it that way and you're just gonna stick to the way it is?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #58 |
Later, we might.
Right now we're concentrating on 0.2 release. I suggest you to concentrate to the ACSC. It's still not entirely fulfilled.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Krozalid (krozalid) wrote : | #59 |
ACSC?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #60 |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mig Eater (mig-eater) wrote : | #61 |
Units gained via bonus crates aren't buildable after being reverse engineered, anyone else having this problem?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
DCoder DCoder (dcoder1337) wrote : | #62 |
Objects grinded by this structure will become available to your house while completely ignoring:
- Prerequisite=, PrerequisiteLists and PrerequisiteOve
- StolenTech, both old and new models
- TechLevel
- Required/
but obeying BuildLimit, PrerequisiteThe
Are you sure your crate goodies meet these conditions?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Graion Dilach (graiondilach) wrote : | #63 |
"[NCO Bug] House *insert player name here* has fulfilled all prerequisites for *unit* but doesn't have a suitable factory!"
Actually, the Not The Owner NCO bug still applies, and I'm 100% sure that one kicks in.
I like the idea...kind of like the smarter, Allied version of Yuri's Grinder.
Will have to see about this one, since *Types are a little pissy about runtime changes, and the type lists are used for all sorts of purposes, I think.
But I'll look into feasibility.