Posts: 182
Threads: 22
Joined: 26 Nov 2006
Reputation:
02.11.2008, 14:42:02
(This post was last modified: 02.11.2008, 15:28:43 by Electro.)
Okay, here's the situation... Implementing this would break Bob's precious kennel hack (D, cue explanation voodoo), however it could be compensated for by adding a ProducedAt=Factory logic, which could be implemented on any TechnoType. Discuss.
Albert Einstein Wrote:Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.
Posts: 379
Threads: 23
Joined: 29 May 2008
Reputation:
I'm gonna sound like a mong, but what's the kennel hack?
MRMIdAS: No longer allowed to criticise Westwood on PPM
Posts: 182
Threads: 22
Joined: 26 Nov 2006
Reputation:
The "kennel hack" can be used to make a factory which can produce only certain units. It was named so because of its notable use for replicating the RA1 Dog Kennels. The hack was that a factory can only produce units which share at least one common Owner= with the factory.
Albert Einstein Wrote:Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.
Posts: 130
Threads: 28
Joined: 9 Aug 2006
Reputation:
Ive never seen that used, I don't feel it would be missed, Do you?
Posts: 1 921
Threads: 273
Joined: 21 Nov 2004
Reputation:
Err, why would that break the kennel hack?
Without a cloning factory, Unit Type A comes from Factory A, Unit Type B comes from Factory B.
With a cloning factory, Unit Type A comes from Factory A and the Clone Factory, Unit Type B comes from Factory B and the Clone Factory.
How else would you implement it?
Forum Rules
(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!
(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Posts: 116
Threads: 6
Joined: 5 Oct 2008
Reputation:
06.11.2008, 06:32:23
(This post was last modified: 06.11.2008, 07:00:57 by mt..)
(06.11.2008, 04:54:29)Renegade Wrote: Err, why would that break the kennel hack?
Without a cloning factory, Unit Type A comes from Factory A, Unit Type B comes from Factory B.
With a cloning factory, Unit Type A comes from Factory A and the Clone Factory, Unit Type B comes from Factory B and the Clone Factory.
How else would you implement it?
Yeah, but these clone factories would ruin the kennel hack by ignoring the Owner= (used for kennel hack), and it would look weird and be wrong.
Example: special unit from special factory also ends up coming from a normal clone factory (instead of special clone factory, or no clone factory), and would look strange.
Simplified: Oh noes! my dogs are coming from clone factories! how strange!
But hes also saying it could be compensated with ProducedAt=Factory, which is a sensable switch IMO.
Example:
[SpecialUnit] ;dog
ProducedAt=SpecialFactory ;kennel
<equals-Hooray mah dog doesn't come from strange clonig factory! Yayzorz>
Instead of giving both the unit and factory different owners (kennel hack).
Electro, this switching would be a good decision IMO.
Posts: 379
Threads: 23
Joined: 29 May 2008
Reputation:
it's a stupid hack IMO, and if it can be replaced with somthing that works and is logical, then so be it.
TBH I've never seen a mod that uses it on RA2/YR, so I doubt it's matter if it was just nerfed.
MRMIdAS: No longer allowed to criticise Westwood on PPM
Posts: 1 921
Threads: 273
Joined: 21 Nov 2004
Reputation:
(06.11.2008, 06:32:23)mt. Wrote: Yeah, but these clone factories would ruin the kennel hack by ignoring the Owner= (used for kennel hack), and it would look weird and be wrong.
Example: special unit from special factory also ends up coming from a normal clone factory (instead of special clone factory, or no clone factory), and would look strange. ................which is exactly what I said?
My point is, all clones coming from the cloning facility would be how it logically should be. Anything else wouldn't make sense. Why would anyone create a cloning lab sophisticated enough to clone humans, or even vehicles........only to then build a second, less-sophisticated cloning facility for dogs?
Or, going from game logic: In the game, you need Soviet Barracks to build conscripts, Allied Barracks to build G.I.s, and Yuri Barracks to build Initiates.
Do you need Allied Cloning Vats to create cloned G.I.s? NO.
Any cloning vat is enough to clone any infantry, so any higher cloning vat should be enough to clone any higher unit.
Nothing is ruined by the simple and obvious solution. Everything would behave exactly as expected, and there is no logical reason why a dog shouldn't be cloned by the same facility that clones Brutes, Yuris, Viruses and Rocketeers, or why some Special Soviet Super Tank shouldn't be cloned by the same facility that would clone IFVs, MCVs, Chrono Miners and Apocalypses.
I mean, seriously. The sole purpose of cloning facilities is that it clones stuff. If you want a specialized facility out of which only that one unit type comes out, you might as well just build a second unit factory and cry for additional build queues.
And not only is the controversy artificial, but the proposed solution is retarded or incomplete as well - because even if you tell your SpecialUnit to be ProducedAt SpecialFactory - what the fuck does the dog care for his producing factory when he's looking for a cloning facility to walk out of? You would not only need ProducedAt=, but also either ClonedAt=, or Clones= if you are so afraid of your dogs being cloned elsewhere.
And that point, you might as well just scratch that and add custom TechnoTypes. 'cause Unit->IsType=Dog, Kennel->Factory=Dog, DogCloningVats->Clones=Dog is a lot more scalable than pointing at specific buildings on every single unit of every single type. Don't believe me? Look:
Broken way (your way):
Code: [Huskie] ; Soviet dog
ProducedAt=SovietKennel
Owner=Magic ; still needed, 'cause the dogs are a common type.
[GermanShepherd] ;Allied dog
ProducedAt=AlliedKennel
Owner=Magic ; still needed, 'cause the dogs are a common type.
[Headcrab] ; Yuri dog
ProducedAt=YuriKennel
Owner=Magic ; still needed, 'cause the dogs are a common type.
[SovietKennel]
Factory=SomeType
Owner=Magic ; still needed, 'cause the dogs are a common type.
[AlliedKennel]
Factory=SomeType
Owner=Magic ; still needed, 'cause the dogs are a common type.
[YuriKennel]
Factory=SomeType
Owner=Magic ; still needed, 'cause the dogs are a common type.
[DogCloningVats] ; Utterly worthless, since it doesn't know what to clone from where
You need one specific kennel to build each breed of dog, special owner magic for the kennel logic, since it has no type distinction, and you can't clone the dogs 'cause the whole point of ProducedAt= is that it's not being produced at its type's cloning vats.
Complete way:
Code: [Huskie] ; Soviet dog
ProducedAt=SovietKennel
[GermanShepherd] ;Allied dog
ProducedAt=AlliedKennel
[Headcrab] ; Yuri dog
ProducedAt=YuriKennel
[SovietKennel]
Factory=Huskie
[AlliedKennel]
Factory=GermanShepherd
[YuriKennel]
Factory=Headcrab
[DogCloningVats]
Clones=Huskie,GermanShepherd,Headcrab
You need one specific kennel to build each breed of dog, no special owner magic, cloning works.
Take note that this is the nice version...ClonedAt= would need another tag on every dog.
Sensible way:
Code: [Huskie] ; Soviet dog
IsType=Dog
[GermanShepherd] ;Allied dog
IsType=Dog
[Headcrab] ; Yuri dog
IsType=Dog
[AlliedKennel]
Factory=Dog
[SovietKennel]
Factory=Dog
[YuriKennel]
Factory=Dog
[DogCloningVats]
Clones=Dog
Any dog can be produced from any kennel, no special owner magic needed, cloning works fine.
In case someone doesn't grasp the important differences between the complete way and the sensible way:
- In the complete way, if you are an Ally and want to build Huskies, you have to build a Soviet Kennel purely for that single breed of dog. In the sensible way, the Huskies will come out of your Allied Kennel - no additional kennel needed (same as for Barracks, War Factory, Shipyard).
- In the complete way, if you want to add a new breed of dog, you have to specifically target which building the dog should walk out of, and you have to update the cloning vats to include the new breed. In the sensible way, you just tell the game this unit is a dog, and it automatically selects the appropriate factory and cloning vats.
- Code-wise, even if you can't program, you'll have to agree that "I clone dogs, is this a dog?" is a lot more efficient than "I clone Huskies. Is this a Huskie? No? Okay, I also clone German Shepherds. Is this a German Shepherd? No? Okay, I also clone Headcrabs. Is this a Headcrab?" (and so on for every unit you have in the list until you have a find).
And before the programmers argue "but custom types is more work!" - for one, you know as well as I do the community will cry for custom types sooner or later anyway. Doing it now saves you doubled work later. More importantly, though, the ProducedAt= system is flawed, a cheap hack at best, clumsy in execution, and prone to usage problems - wouldn't you want to just do it right the first time around, instead of incorporating a crude hack, only to fix it thrice and then make it obsolete by custom types anyway?
Yes, custom types are probably more work. But they are also simpler in logic, more versatile, and solve the specific problem at hand as well as the request for additional cloning vats. Custom types are the better solution, and sooner or later, people will want them anyway.
So. Anyone wanna argue for ProducedAt= again?
P.S.: As an afterthought, you could circumvent one of the problems with the complete way by allowing lists in Factory=, doing this:
Code: [SovietKennel]
Factory=Huskie,GermanShepherd,Headcrab
[AlliedKennel]
Factory=Huskie,GermanShepherd,Headcrab
[YuriKennel]
Factory=Huskie,GermanShepherd,Headcrab
But while that does solve the problem of needing multiple factories for the same type, now you have four lists to maintain - one for each factory and the cloning list. Not to mention that it requires additional hacking of the Factory= code, from simple type selection to parsing and understanding lists.
Still better than the broken way, but far inferior to a custom type system.
Forum Rules
(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!
(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Posts: 379
Threads: 23
Joined: 29 May 2008
Reputation:
06.11.2008, 16:03:53
(This post was last modified: 06.11.2008, 16:05:13 by MRMIdAS.)
What about VehicleCloning=yes?
have a "separate" logic to clone vehicles (in reality it's the same logic, activated by different triggers) and keep the existing logic to only apply to infantry, activated with bog standard Cloning=yes.
MRMIdAS: No longer allowed to criticise Westwood on PPM
Posts: 1 773
Threads: 140
Joined: 22 Nov 2004
Reputation:
You can't reuse Cloning=yes for this, since it doesn't care about any other flag, it just kicks out copies of the infantry from all Cloning=yes structures you have. Either we need an additional flag like ClonesWhat=InfantryTypes,VehicleTypes, etc or a different flag like VehicleCloning=yes. Don't forget Naval=yes will affect what it can produce as well.
Ren: That really depends on the mod. If someone wants to have both a standard war factory and an Advanced War Factory containing only the machinery required to manufacture a sixteen-legged, eight-winged and three-tailed mechanical hydra and name it Mammoth Mk 42 Hell Edition, it doesn't seem likely to expect that an ordinary machine shop would construct or contain such a freak of nature.
Posts: 379
Threads: 23
Joined: 29 May 2008
Reputation:
06.11.2008, 21:11:04
(This post was last modified: 06.11.2008, 21:11:45 by MRMIdAS.)
(06.11.2008, 18:52:16)DCoder Wrote: You can't reuse Cloning=yes for this, since it doesn't care about any other flag, it just kicks out copies of the infantry from all Cloning=yes structures you have. Either we need an additional flag like ClonesWhat=InfantryTypes,VehicleTypes, etc or a different flag like VehicleCloning=yes. Don't forget Naval=yes will affect what it can produce as well.
Thats what I meant, keep the existing cloning= logic applied it to infantry only, and make vehiclecloning= only apply to vehicles, and possibly navalcloning= too, although they're offshoots of the same logic.
MRMIdAS: No longer allowed to criticise Westwood on PPM
Posts: 112
Threads: 13
Joined: 16 Jul 2007
Reputation:
And that's what i meant when I posted the idea.
Posts: 116
Threads: 6
Joined: 5 Oct 2008
Reputation:
07.11.2008, 00:09:22
(This post was last modified: 07.11.2008, 00:12:40 by mt..)
Ren, I wasn't talking specifically about dogs, but the kennel hack logic.
The kennel hack, which can be used for making units come from their own special factory, is useful for modders and such to use.
Example:
UnitZ is a very special unit, which _has_ to come _only_ from a certain factory. It does this with kennel hack. Its made by a mod.
A) If you allow vehicle cloning, it will come from clone factory, and there is nothing you can do about it. It won't come from the factory its supposed to, and would look terrible, because of the nature of UnitZ.
B) You give this one special unit, UnitZ, a ProducedAt=certain factory. This will stop it from being able to come from any other factory, including clone factories. You don't put this on every unit, just the special ones which use the kennel hack.
C) You cannot compare this to game, because AFAIK the kennel hack isn't used in standard Ra2/YR. Also the kennel hack was named so for replicating the RA1 type, where dogs can _only_ be built in a certain factory, like UnitZ (yes this doesn't work in YR, because of cloning vats, but kennel hack can be used for vehicles).
D) You could compare it to infantry, making a UnitZ, and giving them ProducedAt= would stop them from coming from cloning vats.
E) If thats tl;dr or not simple:
1- Kennel hack is used for making a UnitZ work.
2- ProducedAt= would do the same, and is unstoppable by cloning logic.
And this is why it is a logical choice to switch IMO, and could even be implemented to allow the kennel hack on infantry.
Posts: 1 921
Threads: 273
Joined: 21 Nov 2004
Reputation:
(06.11.2008, 18:52:16)DCoder Wrote: Ren: That really depends on the mod. If someone wants to have both a standard war factory and an Advanced War Factory containing only the machinery required to manufacture a sixteen-legged, eight-winged and three-tailed mechanical hydra and name it Mammoth Mk 42 Hell Edition, it doesn't seem likely to expect that an ordinary machine shop would construct or contain such a freak of nature. Of course, for the overly specific situation in which only one singular unit should exit at a specific factory without ever being cloned, ProducedAt would be simpler to use.
Now how likely is it that that will cover the large majority of all extra war factories wanted?
@mt.: I'm not even going to bother. Go back and actually understand my post before you reply.
Forum Rules
(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!
(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Posts: 116
Threads: 6
Joined: 5 Oct 2008
Reputation:
07.11.2008, 05:10:31
(This post was last modified: 07.11.2008, 05:13:34 by mt..)
Quote:@mt.: I'm not even going to bother. Go back and actually understand my post before you reply.
I did understand your post, but I found you to be including the Ra2/YR dogs, and other YR infantry, which don't even use the kennel hack and aren't affected.
To try clear things up, I mentioned I wasn't talking about the dogs specifically (Which would be broken because of the different sides its on), and I meant more as DCoder did, the UnitZ could be such as the unit DCoder mentioned, or much anything else which
Quote:_has_ to come _only_ from a certain factory
|