Don't want invasions from persia or rome, but want the grand

PC/MAC : Turn based Empire building in the ancient Greek World.

Moderator: Slitherine Core

Sarge_Maximus2
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Thu Sep 25, 2008 2:29 am

Don't want invasions from persia or rome, but want the grand

Post by Sarge_Maximus2 »

Hi, I've played Spartan since it has come out, however, I feel the need to play on a huge map with the other countries, without persia or rome interfering. So, my question is, how do I turn the invasions off? Thanks.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

You'd have to edit the events.txt file. It's not simple to explain so have a look and if you feel comfortable start playing with it - keep a backup!
Redpossum
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1813
Joined: Thu Jun 23, 2005 12:09 am
Location: Buenos Aires, Argentina
Contact:

Post by Redpossum »

First, be sure you are in the right scenario folder, \data\maps\GCBasic or some such. Determining which folder is which scenario can be a pain, but each folder is one scenario.

And actually, you do not edit events.txt directly.

The events you want to edit will be in EventsHistoric.txt or EventsInvasion.txt

Make your changes there, then run events.bat, which complies events.txt for you.

I don't have Spartan installed right now, for complex reasons involving the relationship between Spartan and GoT, but let me go install it and see if I can figure this out...
Redpossum
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1813
Joined: Thu Jun 23, 2005 12:09 am
Location: Buenos Aires, Argentina
Contact:

Post by Redpossum »

OK, here goes.

The directory is just called "Grand Campaign". In my Slitherine/Just Play version of the game, the full path is -

C:\Program Files\Slitherine\Spartan\data\maps\Grand Campaign

Woof, how it goes is that you manually run (once) the events.bat batchfile, which compiles all the individual "event" files (which you have edited) into events.txt which the game engine reads each turn.

Now, the contents of EventHistoric.txt come before the contents of EventInvasion.txt

Both those files contain references to the two variables you need to manipulate. Those two variables are -

persiansCantInvade
romansCantInvade

Note the inconsistency of capitalisation. These *are* case-sensitive.

You will see these two variables declared at the very beginning of EventHistoric.txt, but note that they are not assigned a value at that time, that comes later.

So, basically the stuff in EventHistoric sets the two variables to either 1 or 0, with a 1 value preventing invasion, and a 0 value allowing invasion.

Then next in events.txt comes the contents of EventInvasion.txt, which looks at those two variables which were just set, and decides whether or not to check for a random invasion.

Having, in my usual long-winded fashion, explained everything since the dawn of gaming time, I'm now ready to share an actual conclusion.

I would start to going to the top of EventInvasion.txt, which looks like this-

Code: Select all

VARIABLE timeSincePersian
	VARIABLE timeSinceRoman
	VARIABLE timeSinceTribal
	VARIABLE romanInvasionChance
	VARIABLE persianInvasionChance
	VARIABLE tribalInvasionChance
	VARIABLE xPos
	VARIABLE yPos

	IF ( turnCounter < 2 )
	{
		SET timeSincePersian 1000
		SET timeSinceRoman 1000
		SET timeSinceTribal 1000

		SET persianInvasionChance 200
		SET romanInvasionChance 100
		SET tribalInvasionChance 150
	}
and set those two variables to 1, but I'd put it after the declaration of the other new variables, so it'd look like this -

Code: Select all

VARIABLE timeSincePersian
	VARIABLE timeSinceRoman
	VARIABLE timeSinceTribal
	VARIABLE romanInvasionChance
	VARIABLE persianInvasionChance
	VARIABLE tribalInvasionChance
	VARIABLE xPos
	VARIABLE yPos

		SET persiansCantInvade 1
		SET romansCantInvade 1

	IF ( turnCounter < 2 )
	{
		SET timeSincePersian 1000
		SET timeSinceRoman 1000
		SET timeSinceTribal 1000

		SET persianInvasionChance 200
		SET romanInvasionChance 100
		SET tribalInvasionChance 150
	}
Then run events.bat to compile the changes you just made into a new events.txt file, and give it a try.

In this way we have bypassed the whole process of setting those two variables by historic events, and just set them both to 1 every turn, right before they are checked.

I hope this all made sense; feel free to ask questions if it didn't.
Sarge_Maximus2
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Thu Sep 25, 2008 2:29 am

Post by Sarge_Maximus2 »

How do you run events.bat and where can I find it?
Redpossum
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1813
Joined: Thu Jun 23, 2005 12:09 am
Location: Buenos Aires, Argentina
Contact:

Post by Redpossum »

Sarge_Maximus2 wrote:How do you run events.bat and where can I find it?
It's not there in the directory? There should be a copy in the map directory listed above. To run it just double-click on it :)
Sarge_Maximus2
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Thu Sep 25, 2008 2:29 am

Post by Sarge_Maximus2 »

Nope, don't see it. What is it like? I only have txt, RES, and DAT, files in there. Maps/Grand Campaign, right?
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

You dont really need it - you can edit the events.txt file itself. The bat file just bolts the pieces together in to one large file.
Sarge_Maximus2
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Thu Sep 25, 2008 2:29 am

Post by Sarge_Maximus2 »

ok well, I've made the above changes and the persians still invaded so... help please. :(
Redpossum
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1813
Joined: Thu Jun 23, 2005 12:09 am
Location: Buenos Aires, Argentina
Contact:

Post by Redpossum »

Sarge_Maximus2 wrote:ok well, I've made the above changes and the persians still invaded so... help please. :(
Okay, let me look into it, and I should have a reply for you later today (Pacific Time) :)
Sarge_Maximus2
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Thu Sep 25, 2008 2:29 am

Post by Sarge_Maximus2 »

Well, it's been quite a while since I posted a reply and I'm still waiting for help. is there a way to simply make the persians less sophisticated? like, can you make them ot so strong both economically and militarily? so that even when they do invade they don't make much trouble? Thanks.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

You can edit the events.txt file to remove them but you'd have to read it through to understand which bit to change.
scarfacetarraff
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 314
Joined: Fri Apr 08, 2005 11:02 pm
Location: USA

Post by scarfacetarraff »

When you see them approaching at sea, send out your forces and sink them before they land. Your much better against them on water than on land.
"Hasta la victoria siempre!"
Legion (Mac/iPad), Spartan (Mac), GoT (Mac), Legion Arena (Mac), CEaW (Mac/DS), CNaW (Mac), HGE: Rome (DS), Egypt: EaE (iPad), FoG (Mac), Battle Academy (Mac/iPad), Unity of Command (Mac), CTGW (iPad)
Sarge_Maximus2
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Thu Sep 25, 2008 2:29 am

Post by Sarge_Maximus2 »

Ok, how about this, can I simply make it so that the invadig army is always just a small one and never gets any bigger than say one unit?
Lizard_of_Oz
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 1
Joined: Wed Mar 13, 2013 11:32 pm

Re: Don't want invasions from persia or rome, but want the g

Post by Lizard_of_Oz »

I have a similar question, simply because every time the Persians enter the game in Grand Campaign (or indeed Enter the Persians) they end up flattening me one way or another. Thing is I have the Mac version of the game so I don't think I can get into the events.txt the same way
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Don't want invasions from persia or rome, but want the g

Post by pipfromslitherine »

If the Mac version is an .app file (i.e. a single icon) you should be able to open it up and view the files inside by right clicking and choosing "show contents" or something like that. Then go to Resources and you should see the file layout as per the PC version.

Cheers

Pip
Mazeppa
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 30
Joined: Sun Aug 12, 2012 10:27 am

Re: Don't want invasions from persia or rome, but want the g

Post by Mazeppa »

I know this thread was here for a while, but nevertheless, I'll answer on it based on what I know so far :)

In my game, the events.bat file is also unavailable, thus I've shared the same suffering as the guy here. But if you download the mod kit upstairs, the events.bat file is there. Just go on the maps file and go on any map you want to edit. Its there. Copy it and then put it in your modded file. And run it and voila! Its done! :D

With regards to editing txt files, if you edit txt files on "Historic" or "Invasion", you'll also have to edit the events.txt files too - just go Cntrl+F whatever section you got whether Historic or invasion and mirror the changes you did on the Historic/invasion.txt files. After that, run events.bat and you've done it. :) Just keep a backup copy of the events.txt file just like how you'd do for the other txt files you've edited - just in case your game gets f*cked. ;)
SargeMaximus
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 1
Joined: Wed Nov 05, 2014 12:17 pm

Re: Don't want invasions from persia or rome, but want the g

Post by SargeMaximus »

Hi all. Had to create a new account just to post here, but as you can guess I'm the original poster.

So i've tried modding the files, even using the mod kit, but I just crash the game. Can someone please give me a step by step method that they themselves have proven to work?

If it makes any difference I'm using a windows 7 right now.
JoeDeveloper
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Fri Feb 27, 2015 9:55 pm

Re: Don't want invasions from persia or rome, but want the g

Post by JoeDeveloper »

I'm a long time fan of Spartan too. I recently modded it so that any barbarian, Roman, or Persian invader will only always be 1 army strong. I'm playing it now for testing on grand and it works. Strangely the Persians still managed to come in and start taking territory and now coming after me(Byzantine) with hordes. The South East Greeks must have been on siesta when their "HUGE" flotilla of 2 ships with 1 army each came. =)

You don't need to compile it. It works by just editing the text files. However, as Possum set it up, it doesn't work as there are additional places where the CREATEARMY function is called. I edited EventBarbarians/EventHistoric/EventInvasion/events txt files and set all "VARIABLE armySize" to be 1 . Do this by a Crl-Find "armysize" and then replace whatever it says for "SET armySize ????" with "SET armySize 1" and any invader army will always be 1 army but they will become a 1 army stronger unit with time. There seem to be some other settings that make Perians strong once they get a foothold so I'm gonna explore the complete disabling of them and Romans at some point after this long game is over.

I could send you my edited files or post them here to save you the trouble but I'm not sure how to here or how we could connect.

Live Long and Prosper!

Joe

PS is there some table somewhere where one can see what tribe can build what units? It's in the code but it is listed per unit type so it is very hard to get a grasp on from a tribal point of view.
JoeDeveloper
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Fri Feb 27, 2015 9:55 pm

Re: Don't want invasions from persia or rome, but want the g

Post by JoeDeveloper »

OK - I setup the 4 files on a place called textuploader. But I cannot post them here cuz I'm new here. :(

They don't even allow me to to PM offsite urls. If anyone is interested please PM me. Maybe we can figure something out or HOST PLEASE ALLOW ME TO POST THEM?
Post Reply

Return to “Spartan & Gates of Troy”