code question(?), adding an IP, trenche etc.

The Campaign Series: Middle East 1948-1985 is a new turn-based, tactical wargame that focuses on conflicts in the Middle East.

Moderator: Jason Petho

Post Reply
User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

code question(?), adding an IP, trenche etc.

Post by carll11 »

So, adding an IP, (16), trench(128) or bunker (32) while IN scenario ( that is in an active game) you find the hex in the save file, add a line "2" ( unless theres a wreck in the hex thats another story)then the hex # and one of the fortification numbers ex; 2 102 34 16, I have added a IP to hex 102 34...... this is ez or apparent to me mechanically while units are IN the hex, but, how does one add a fortification if the hex is unoccupied?

User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

Otherwise

You can build IP's in the game, most infantry type units can construct these.

You can also build trenches in the game, but ONLY Constuction Engineers can do that and they require an IP to be build before hand.

You cannot build bunkers during the course of a scenario.
User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

Hi Jason, yes I understand those guidelines etc.

I was specifically asking how to add one in a saved game file, once the game is underway by manipulating or adding to the text.

I sometimes reward or award these positions during the game, so as I say, you can add them in the text file, heres an example;

This is the code for 2 Israeli units,

0 98 34 P222031 1039 32 16 6 0 0 30 10 0 1 0 3 3 3 3 0 0 -1 -1
0 98 34 P222059 1042 8 8 1 0 0 30 10 0 16777225 0 3 3 3 3 0 0 -1 -1
2 98 34 128
4 98 34 0 1 0
4 98 34 1 1 0


the 128 I bolded above is the code text for a trench being present in that hex....if the game started without a trench in that hex, that whole line starting with 2 would not be present
( unless a wreck is created in that hex and the 128 would be a different number altogether and doesn't matter re: what I am asking).

So lets say turn 9 I want to add a IP or Trench or bunker to a hex that doesn't have either of those yet, the code would read what it says above without the line starting with 2, one can add it easily by adding the line 2 as I have.

But, it appears that that can only be done IF there are units in the hex already, I am seeking to discover how one can add it to a hex that doesn't have any units yet? As if, I had added it to an empty hex while I was editing Before I started the game.............


User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

Are you making sure you are adding that to each portion of the PBEM file that references that hex?

If you are only changing it once, it might not work.

Of course, adding a Construction Engineer will allow the player to build a trench where they wish.

User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

These arn't pbem games, just me vs. the AI.


I have done this many times, it works fine,as long as one is careful of course, its only now that I have considered adding one to an unoccupied hex.

User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

Yes, exactly....
User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

Are you making sure you are adding that to each portion of the BTL file that references that hex


That still is relevant, you have to make sure you add the feature in all the areas where that hex is referenced
User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

Okaaaaay so, let me give you a working example I created in my btl. file;

3 Israeli platoons at hex 115 36:

0 115 36 P221049 825 16 32 2 0 0 20 8 0 262144 0 3 3 3 3 0 0 -1 -1
0 115 36 P222031 835 16 8 6 0 0 100 8 0 0 0 3 3 3 3 0 0 -1 -1
0 115 36 P222031 824 16 16 6 0 0 100 8 0 0 0 3 3 3 3 0 0 -1 -1
2 115 36 16
4 115 36 0 1 0
4 115 36 1 1 8

I added the 4th line 2 115 36 16 and viola' an IP appeared in the hex when I opened the game up again via that save ( btl. file)

Now the only other mention of a hex 115 36 in that btl is;

14 825 115 36 106 34 0
14 825 115 36 106 34 0

If indeed that references 115 36 ( 106 34 looks like a hex # too*shrugs*) anyway, are you saying there is something I have to do to that code set as well?

User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

If you add the following:

2 10 10 32
4 10 10 0 1 2

It will add a bunker where you want it (changing the 10 10 for your preferred location). Also make sure you are putting it in the right squential order!
User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

What test was unsuccessful?


Anyway, yes the 2 10 10 32 ( 10 10 being the hex )directly beneath the units in the btl. text position always works for me.....16 is an IP, 32 yes a bunker and 128 a trench.

Are you saying that I can add;

"2 10 10 32
4 10 10 0 1 2"

( using 10 10 as our mythical hex) somewhere in the btl. text and an ip etc. will appear there even if there are no units in the hex?


If so the question of where exactly, would I enter this set of code? Where in the text file....I think there are sections etc. delineating different game mechanics.




User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

somewhere in the btl

Well no, it can't just go anywhere. It has to go in the file in a numerical order.
User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

do we know that order?

I'll look again later but it appears theres as I say, a few sections that speak to certain mechanics, for example the reinforcement section, release section etc...the numbers not withstanding.
User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

Yes, you can identify the order by the hex location in the main area, not reinforcements.
User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

I am as I described above using the example;

0 98 34 P222031 1039 32 16 6 0 0 30 10 0 1 0 3 3 3 3 0 0 -1 -1
0 98 34 P222059 1042 8 8 1 0 0 30 10 0 16777225 0 3 3 3 3 0 0 -1 -1
2 98 34 128
4 98 34 0 1 0
4 98 34 1 1 0


Now as far as adding it again somewhere else? I don't get that, its working fine now, adding it again say in this area where the hex numbers appear again...?I guess I dont see the point.....

14 825 115 36 106 34 0
14 825 115 36 106 34 0

User avatar
Jason Petho
Posts: 17489
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: code question(?), adding an IP, trenche etc.

Post by Jason Petho »

So, if you wanted a bunker close to your position above, but not in the same position (ie, at 100 36), it would be like this

0 98 34 P222031 1039 32 16 6 0 0 30 10 0 1 0 3 3 3 3 0 0 -1 -1
0 98 34 P222059 1042 8 8 1 0 0 30 10 0 16777225 0 3 3 3 3 0 0 -1 -1
2 100 36 32
4 100 36 0 1 2

This infers there is nothing (sequential hexes) else between your location and the infantry units listed above.

User avatar
carll11
Posts: 955
Joined: Thu Nov 26, 2009 2:07 pm

RE: code question(?), adding an IP, trenche etc.

Post by carll11 »

Ah, ok I see, thx!!
Post Reply

Return to “Campaign Series: Middle East 1948-1985”