Counter to the circus exploit?

Discussion and help with using the in-game editor
Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Counter to the circus exploit?

Postby Hieronymus » Fri Oct 05, 2007 7:07 pm

I thought I'd post this as I believe I've come up with a script which provides a (partial at least) counter to the "circus exploit" (the one where you can get the culture boost from a circus that has no connecting road). I've tried it out in Gades and it seems to work, so I'll share it here.

Actually, I thought of two ways. I'll deal with the interesting one in this post, then the not so interesting one in the next.

Remember we are working within the constraints of the available methods we can use. we can't find out whether a circus has connecting roads - but we can find out whether we have one that is inactive (as one with no roads must be). All we need to do is call game.GetInactiveBuildings with the ID for the circus and we have it. What can we do then? Well, in Gades, I decided just to burn it down - with a message saying that rioting plebs, incensed at having a circus with no show, took the law into their own hands.

There is a catch. There is always a catch. The game counts a circus as inactive, not only if it is mothballed or has no roads - but also if it is waiting for a chariot to appear. So we have to allow for that. In the end I decided that a month was a reasonable amount of time to wait (and sort of consistent with the story). But it does mean it is only a partial counter, as a player will get a culture boost for a month - which might be enough to achieve victory.

Here's the code. First we need declarations:

private Int32 mIDCircus = IDMaker.FromString("C4b service Circus");
private uint noCircus = 0;


We could track the time by querying the game time, but I decided to use a tick counter instead, called noCircus. On the basis that one game tick ~ 2 seconds and 20 seconds make a game week, if the "noCircus" count reaches 40, that will tell s it has been inactive too long.

The code itself is here:

uint num;
game.GetInactiveBuildings(mIDCircus, out num);
if (num > 0)
[INDENT]noCircus++;

else
noCircus = 0;

if (noCircus > 40)
{
msgTitle = "Circus_Title";
msgText = "Circus_Text";
msgSound = "/../../sounds/events/event_coliseum_05.wav";
game.SendGameMessage((uint)MessageCategory.kLocalEventMessage,
(uint)MessageDisplay.kMessageDisplaySignificant, ref msgTitle, ref msgText, ref msgSound); game.TriggerFireDamage(mIDCircus, 1, 99);
noCircus = 0;

} [/INDENT]

So, what we do is check if there is an inactive circus. If there is (num is greater than 0) we increment the counter noCircus. If there aren't any, there can't be a circus exploit, so we just reset the counter to zero for next time.

Then we check if the noCircus counter is above 40. If it is, it means it's been inactive for more than a month - that's bad. Most what happens next is setting up the message to tell the player the bad news, then sending it (the actual message itself being set in the XML file). I picked a sound to play, which sort of sounds like a few rioting plebs, but this can be changed of course. Finally we set fire to the circus! And don't forget to reset the counter.

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Fri Oct 05, 2007 7:11 pm

The next method is simpler, but less spectacular. Here game.ScriptDone is your friend. Set it to false, and the victory screen will never appear, no matter what the ratings and other things that are needed for victory.

uint num;
game.GetInactiveBuildings(mIDCircus, out num);
if (num > 0)
[INDENT]game.ScriptDone = false;

else
game.ScriptDone = true;
[/INDENT]
So here an inactive circus will prevent victory, even if all victory conditions are met. Having an active circus, or no circus at all, will enable victory if all the conditions are met. Thus it is only useful if the culture rating is high enough to justify needing a circus - though you may think that anyone who tries to use the circus exploit doesn't deserve victory.

Romaq
Posts: 576
Joined: Thu Jun 07, 2007 1:04 pm
Contact:

Postby Romaq » Sat Oct 06, 2007 12:59 am

Hrm... is it possible to insert an error message if all other conditions for victory have been met? "While you have a Circus, nobody appears to know or care and it sits empty." Something that provides a clue at the time victory is met, and the clue needs to NOT spam. Perhaps the first notice of 'false victory' is enough, and further checks need provide no further clues.

Wack somebody if you must, but providing 'just enough' of a clue may provide the warning to fix the problem instead of wondering why 'enough' isn't 'enough', which would be considered a bug.

EDIT: Unfortunately for me, I cheated myself out of being able to play C4 'the right way'. I'll fix that over time, but at the moment I'm left without a context on the Circus Exploit. It sounds as if you simply drop a circus when you can afford it but NOT supply it with roads. Since the effect is 'universal', even disconnected (which is still everything in this case) gets the benefit. Do you still need to supply it with a chariot guild? Do you still need to supply it with equites? If you MUST have the chariot guild and MUST have the equites to supply it, how big of an exploit is it really? It may be, I just don't have a context from gameplay.

--Romaq
Last edited by Romaq on Sat Oct 06, 2007 2:42 am, edited 1 time in total.

Kiya
Posts: 3235
Joined: Sun May 09, 2004 8:12 pm

Postby Kiya » Sat Oct 06, 2007 8:23 am

Romaq wrote:... at the moment I'm left without a context on the Circus Exploit. It sounds as if you simply drop a circus when you can afford it but NOT supply it with roads. Since the effect is 'universal', even disconnected (which is still everything in this case) gets the benefit. Do you still need to supply it with a chariot guild? Do you still need to supply it with equites? If you MUST have the chariot guild and MUST have the equites to supply it, how big of an exploit is it really? It may be, I just don't have a context from gameplay.

If I got this right, you do not need a charioteer guild nor equites to work there, that's the benefit of the circus exploit. You just drop a circus somewhere without connecting it with roads to the rest of the city and that's it!

Romaq
Posts: 576
Joined: Thu Jun 07, 2007 1:04 pm
Contact:

Postby Romaq » Sat Oct 06, 2007 8:42 am

WOW QA missed that one. I think at the level of play where a Circus comes into effect, people 'cheat' or they 'do not cheat'. I've cheated, simply trying to learn some of the game dyamics issues without having to devote time to building up the cash fund. I wouldn't get too worked up over the exploit in user scenarios, but that one ought to throw a foul in contest scenarios.

--Romaq

Kiya
Posts: 3235
Joined: Sun May 09, 2004 8:12 pm

Postby Kiya » Sat Oct 06, 2007 8:50 am

Well, the circus exploit was / is excepted in city building contests. Not that there is any need for it (I think) in the present contest which is a military / economic one.

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Sat Oct 06, 2007 9:45 am

Kiya wrote:Well, the circus exploit was / is excepted in city building contests.

Well, I should say that when I told goonsquad about this potential counter, he did get very interested... ;)

Kiya
Posts: 3235
Joined: Sun May 09, 2004 8:12 pm

Postby Kiya » Sat Oct 06, 2007 1:00 pm

Hieronymus wrote:Well, I should say that when I told goonsquad about this potential counter, he did get very interested... ;)


I'm sure he is interested, naturally, in anything that is related to game exploits, bugs, fixes..... :D

King Faticus
Posts: 4230
Joined: Tue Sep 20, 2005 1:20 am

Postby King Faticus » Sat Oct 06, 2007 2:13 pm

combine the two scripts!
lol make the Circus burn down if inactive for too long AND prevent the victory screen while it is inactive :eek:

that'll teach em :p

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Sat Oct 06, 2007 4:23 pm

Hieronymus wrote:Finally we set fire to the circus!


Ding! :D

Kiya
Posts: 3235
Joined: Sun May 09, 2004 8:12 pm

Postby Kiya » Sat Oct 06, 2007 4:30 pm

A fire? :cool: :rolleyes: Why not proper fireworks? :D

We still haven't had anything even remotely resembling a good festival in C4. :( CoTN has its parties and Emperor that lovely new years festive procession...

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Sat Oct 06, 2007 4:45 pm

King Faticus wrote:combine the two scripts!
lol make the Circus burn down if inactive for too long AND prevent the victory screen while it is inactive :eek:

that'll teach em :p

LOL! Might just do that...

Kiya wrote:A fire? :cool: :rolleyes: Why not proper fireworks? :D

Well we could do a thunderstorm at the same time. Would that do? :D

Though I imagine our friend Tinkerbell would want an earthquake on top of that (just to make sure) :eek:

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Sat Oct 06, 2007 4:49 pm

Hieronymus wrote:Though I imagine our friend Tinkerbell would want an earthquake on top of that (just to make sure) :eek:


Attaboy! :D

There needs to be a penalty for cheating. Losing 1000 dn is NOT enough! :cool:

<ducking>

PS ~ Can you do a lightning bolt from Jupiter to destroy the Circus, Hieronymus? :eek:
Last edited by Tinkerbell on Sat Oct 06, 2007 4:58 pm, edited 1 time in total.

Kiya
Posts: 3235
Joined: Sun May 09, 2004 8:12 pm

Postby Kiya » Sun Oct 07, 2007 3:21 pm

Let's see what you're going to do if you're not using this exploit. You need timber and a charioteer guild. Your circus probably cannot be in the center of the city because of it size, and then connected with a road to the city.

What do you do if you need this exploit? I think they used this one to get 100 culture just before the victory screen. So you plop your circus somewhere in the very last minute (a month before the end?) and it's done, your 100 culture rating. :D

So you better be quick about your lightnings, thunderstorms, earthquakes and stuff, as not to harm the non-exploit user whose guild and timber (warehouse) might not be right next door to the circus. :eek:

Romaq
Posts: 576
Joined: Thu Jun 07, 2007 1:04 pm
Contact:

Postby Romaq » Sun Oct 07, 2007 5:08 pm

Wacking an honest non-exploit user in an effort to snag a cheater is... not good. At some fine-grain tuning point, I'd as soon let cheaters pass. If it's a standalone game, it doesn't matter. If it's a contest, a review of high scorer's cities would be in order ANYWAY, and a 'cheat' would be plenty detectible then and grounds for disqualification.

--Romaq

goonsquad
Posts: 539
Joined: Fri Aug 19, 2005 11:01 am

Postby goonsquad » Sun Oct 07, 2007 9:47 pm

The thing with CBC contests is not that we particularly want to counter every exploit in the game, its that we want a level playing field so that the winner isn't determined by these things. We are certainly not obsessed with stopping every little exploit, and where it is simpler on everybody just to make the exploit known to all, we take that course.

This counter could have been of some use in Silk Purse, in which a 100 culture rating was called for, but in the current contest it is of no relevance, as Lokki says, because there is no advantage to be gained from having a high culture rating.

I have a little block of code that I use in every contest. It disables plazas. It's so easy to include I always do it as a matter of course.

I have a sneaking suspicion that I know how the penny dropped for this counter. I won't elaborate, but I expect Hieronymus will know what I'm talking about.


Return to “Editing”

Who is online

Users browsing this forum: No registered users and 1 guest