HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Funny thing about construction

08-13-2008, 12:21 AM#1
ToukoAozaki
I was trying to implement wc2-style building mechanism and found out something very funny.

If you change owner of the constructor (peon) to neutral player when construction event occurs, you'll find out that the cost is not deducted. I haven't checked out whether it will affect the new owner's resources.

Have any ideas?
08-13-2008, 12:31 AM#2
Anitarf
Interesting. Since the neutral player probably didn't have any resources, it seems unlikely that the new owner's resources are affected, or, if they are, the check whether they have enough at all is already skipped, in which case this could be a way to generate deficit; but more likely, the resources either aren't affected at all or neutral players are some sort of an exception. It would definitely require further testing.

The building is still built for the original player?
08-13-2008, 12:43 AM#3
ToukoAozaki
Quote:
Originally Posted by Anitarf
The building is still built for the original player?

Yes. At the point event occurs, the resources are already deducted and construction is about to begin. Once I change the ownership, the deducted resources are just returned. Therefore, I had to store resources before ownership change and apply it later.
08-13-2008, 12:00 PM#4
Captain Griffen
Defensive coding on the ordering to build and building side is, to be honest, non-existant.
08-13-2008, 12:18 PM#5
ToukoAozaki
Quote:
Originally Posted by Captain Griffen
Defensive coding on the ordering to build and building side is, to be honest, non-existant.

Um, would you please clarify what you're talking about? I can hardly get the point.
08-13-2008, 01:49 PM#6
Captain Griffen
Expect odd behaviour when messing around with building stuff.

Not limited to:
- Crashes (ordering someone to build at the exact same time as another unit is ordered to build...)
- Buildings giving double food (sometimes when force to completion instantly).
- Incorrectly displayed effects (removing a unit in construction plays an explosion, if I remember correctly).
08-13-2008, 04:59 PM#7
MaD[Lion]
so how can we exploit these things to take over the world?
08-13-2008, 05:03 PM#8
Troll-Brain
Quote:
Originally Posted by MaD[Lion]
so how can we exploit these things to take over the world?

Use subliminal messages and if the player is not agree with them display incorrectly effects, if he is still not agree crash the game, if he is agree give him double food.

Oh that wasn't time of flood ?