Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Sirbomber on November 20, 2005, 07:11:47 AM

Title: "cheated Game!" Box
Post by: Sirbomber on November 20, 2005, 07:11:47 AM
So, does anybody else want/think somebody should remove the annoying CHEATED GAME! box that shows up because we're > OP2? And is it even possible now that I think of it? Because we're trying to set it so if you have no CC you're morale gets set at 75 until you build a new one, then it goes back to normal. But the game doesn't like this and presents us with the accursed obstruction of cheatiness.
Title: "cheated Game!" Box
Post by: Betaray on November 20, 2005, 11:09:43 AM
ive never seen this box, is it somthing you see when you are making new maps or somthing?
Title: "cheated Game!" Box
Post by: spirit1flyer on November 20, 2005, 11:31:52 AM
I've never seen it ether  :unsure:

are you making a colony or multi game?    if so maybe you have cheat code in your source?
Title: "cheated Game!" Box
Post by: Sirbomber on November 20, 2005, 12:10:58 PM
(http://i5.photobucket.com/albums/y197/Sirbomber/cheatedgamesmall.jpg)
Title: "cheated Game!" Box
Post by: spirit1flyer on November 20, 2005, 12:34:20 PM
I repeat my question.

are you making a colony or multi game? if so maybe you have cheat code in your source?  
Title: "cheated Game!" Box
Post by: Sirbomber on November 20, 2005, 12:38:50 PM
Multiplayer game, and no there isn't any "cheat code"...
Title: "cheated Game!" Box
Post by: spirit1flyer on November 20, 2005, 01:22:03 PM
I don't have a clue then sorry
Title: "cheated Game!" Box
Post by: Sirbomber on November 20, 2005, 01:34:17 PM
Somehow, I figured you wouldn't...  :huh:
I was kinda asking hacker/etc if there was anyway to jsut remove that box from the game, not just the map. It would let people do a lot more stuff that the game might consider cheating, since some people might be discouraged from playing a map that the game says is rigged.
Title: "cheated Game!" Box
Post by: Eddy-B on November 20, 2005, 02:43:08 PM
Okay, here's the clarification:
The "Cheated Game" text appears on the screen, when you are able to play on, even though you should get the "you have failed" message.
This has to do with the way the mission was coded.
If you alter existing DLLs to make it, so you can't loose the game, that is considered a "Cheated Game". In this case: when your CC is disabled (due to damage or by dismantling it) you are still able to continue playing, while it should have a FailureCondition, hence the cheat text.

see also: this thread (http://forum.outpostuniverse.net/index.php?showtopic=1157)
Title: "cheated Game!" Box
Post by: Hooman on November 20, 2005, 05:32:44 PM
Yes, I've been planning to look into exact causes of this for some time, but I've never had a DLL that causes that to appear whenever I've been interested in looking into it.

I don't suppose someone could send me a DLL?
 
Title: "cheated Game!" Box
Post by: Sirbomber on November 20, 2005, 06:08:11 PM
Easily. I already have one made up. Just decon your CC and you get "Cheated Game!".
Hmm... didn't seem to want to attach.
Title: "cheated Game!" Box
Post by: Hooman on November 20, 2005, 06:30:19 PM
Thanks. I'll take a look at that and what Harky has given me today. I'll see what I can find out.
 
Title: "cheated Game!" Box
Post by: zigzagjoe on November 20, 2005, 08:02:29 PM
what are you trying to do and what are you using to make the dll?(mapper, msvc?)  old vers of my LR code are the only things that ive known to cause that. i belive i fixed that a while ago; and ill post the modified zighooville w/it sometime.

(*looks at modification date* damn 2months !)
Title: "cheated Game!" Box
Post by: Sirbomber on November 20, 2005, 08:36:02 PM
We're trying to make a lack of a command center give you steady morale at 75. It resets if/when you build a new cc.
Title: "cheated Game!" Box
Post by: Betaray on November 20, 2005, 10:11:46 PM
well isnt it normally for land rush when you dont have a cc morale is steady, and when you build it morale starts working, and after that, if you loose a cc you die?

so you want to make it so that if you dont have a cc, but you have a kit in a convec and you dont die, and your morale is steady?

just trying to understand why your doing this
Title: "cheated Game!" Box
Post by: zigzagjoe on November 20, 2005, 10:16:32 PM
seems simple enough:

void AIProc()
{

   for (int i = 0; i < TethysGame::NoPlayers(); i++)
   {
      int n=0;

      Unit unit;
      PlayerBuildingEnum unitEnum(i, mapCommandCenter);

      while (unitEnum.GetNext(unit))
         n++;

      if(n==0) { TethysGame::ForceMoraleGood(i); }
      else { TethysGame::FreeMoraleLevel(i); }

   }
      
}

but its not, i get the same message...coudlve sworn there was a way to set morale for a player but im drawing a blank...(psst hooman...this is ur cue)
Title: "cheated Game!" Box
Post by: Hooman on November 20, 2005, 11:32:59 PM
Lol, yes. I said I'd look into it. I haven't got around to it yet but I will. I've now got two levels that cause this problem to help with my investigation. I think maybe I'll be taking a peek in a few minutes. We'll see what turns up.

 
Title: "cheated Game!" Box
Post by: Hooman on November 21, 2005, 01:09:16 AM
Ok, I've looked into it, and I've come to the same conclusion I've come to before, but with more certainty this time. (I forgot about last time, or was just not very sure I wasn't getting it confused with something else that was similar).

It seems ANY game option that is set after tick 0 (i.e., anything not set in InitProc) other than FreeMoraleLevel will cause this to appear. This will include any of the ForceMorale commands, as well as things involving daylight. There is also a set game speed that can trigger this, but I would assume it's only used in network games to force everyone to the same game speed.

Basically, the game keeps track of when the last game option was set (other than free morale level) and if that value is ever non zero, it'll print the "CHEATED GAME!" message.



So, it seems the way you plan to write your level, it won't be possible to get rid of that message. At least not if you restrict yourselves to the usual Outpost2.exe exports. You can always do some mem hacking to remove that message if you really need it. But then, I'd suggest asking yourselves how important it is to freeze morale while you're relocating your base. Could you settle for just unfreezing morale once, when you first deploy a CC?
Title: "cheated Game!" Box
Post by: Sirbomber on November 21, 2005, 01:50:38 PM
It's kinda important, we don't want people to die off because they were relocating and couldn't get set up in time.

So I suppose we just tell people to ignore it for now or tell them their alternatives. (in other words, death)
Title: "cheated Game!" Box
Post by: BlackBox on November 21, 2005, 04:37:24 PM
Joe, that's not the correct way to do it.

What I would do is create two Operational triggers, one that detects when a player CC count is greater than or equal to 1, and one that detects when the CC count is 0.

Then in the respective trigger functions, modify the morale level accordingly.

FYI, you should really avoid processing in AIProc if you can help it. It's rarely the best way to do things, and it can slow down the game immensely.

Also, I don't really think it would be that difficult to remove the cheated game message.
Title: "cheated Game!" Box
Post by: Hooman on November 21, 2005, 05:31:58 PM
I could give you details on how to remove it. I've got the code labelled in OllyDbg and I have comments around much of it. Although, there are a number of ways we could consider doing this. I'd say we need to chat about it on IRC sometime.

Really though, I recommend we don't remove it. One reason would be that levels designed for a new version would have that weird glitch if someone tried to run it with a CD version. Probably not too likely, but there could be other problems as well.

The second reason, is that it's there for a reason. You could reasonably cheat without being detected by doing things like fixing morale for yourself. Granted, this doesn't protect against fixing things during startup, but if someone codes a change later in the game, it'll be obvious what they've done.
 
Title: "cheated Game!" Box
Post by: Sirbomber on November 21, 2005, 05:52:26 PM
Quote
What I would do is create two Operational triggers, one that detects when a player CC count is greater than or equal to 1, and one that detects when the CC count is 0.

Yeah, that's what I said we should use, and it worked.
The problem isn't the code (it works fine), it's the evil box of doom. Which seems to be unfixable.
Well, thanks for all your help anyways.
Title: "cheated Game!" Box
Post by: Hooman on November 21, 2005, 06:20:30 PM
Yeah, that's the method I suggested to Harky a few days back.

The "evil box of doom" is caused by the TethysGame::ForceMoraleLevel* functions. It doesn't matter how you detect the CCs. It's the morale calls that cause that box.

Is it possible to start putting up the next base before deconstructing your old base in that level? That could solve some of the issues.
 
Title: "cheated Game!" Box
Post by: Sirbomber on November 21, 2005, 06:31:45 PM
Sure, it's possible. Not feasible though. You have to leave at least some stuff behind to decon your old base or you're, well, screwed. Then you also have to had researched Mobile Weapons Platform so you can "decon" your mine. (since mines have to be blown up)

So, basically, the most you'd have time to take is a cc, struc fac, tok, and smelter if you're lucky.
Title: "cheated Game!" Box
Post by: Starfox00000 on November 30, 2005, 10:13:11 PM
Quote
Yeah, that's the method I suggested to Harky a few days back.

The "evil box of doom" is caused by the TethysGame::ForceMoraleLevel* functions. It doesn't matter how you detect the CCs. It's the morale calls that cause that box.

Is it possible to start putting up the next base before deconstructing your old base in that level? That could solve some of the issues.
I don't know much about programming (although I'd like to), but new base set up or not I get the "evil box of doom" as soon as the game starts, not when my first cc dies.
Title: "cheated Game!" Box
Post by: Harky on November 30, 2005, 10:59:50 PM
No its the code that does i..t becasue the morale can be set steady / unset after the first cycle of the game 1/4 of mark 1.. so since it can be set or unset after that time it says cheated game..  it doesnt mean u are cheating.. it just means cheating can happen..
Title: "cheated Game!" Box
Post by: Hooman on December 01, 2005, 03:37:25 AM
This would apply to forcing morale to a certain level even though it's already forced there. Also, triggers fire constantly when their condition is satisfied, not just the first moment at which they're satisfied. The way those triggers were written in the code I've seen pretty much ensured constant calls to force morale level during to the repeated firing of triggers. It was also a bit odd that it forced morale, and then checked and freed it if needed. You shouldn't force morale when you don't need to really. That would at least only make that box appear when people lose their CCs.