Author Topic: Spawn Point creation on Custom Fields  (Read 2056 times)

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« on: October 18, 2006, 02:42:37 PM »
As I was working on my custom field I see that the custom spawn point doesn't quite work yet.  To get around the problem it seems the only way to create the entry points is through the TE.  I did notice some standard shp have the entry point defined like 'medrwy' and 'lrgrwy' that work correctly, but rwy0 - 3 does not.  To get around this issue I created a program that will use a .til file and existing .oba and place the need spawn points into the .oba file for you so you don't have to do this manually. This can save you count less hours if you have same custom field setup 30+ times on a map..

Here are the steps....

1.) create an empty directory and place the addspwn.exe along with
the .shp files that come with it.  

2.) Copy the cfte0.shp, cbme0.shp, and cvhe0.shp to your userlib file before starting the OE.  

3.) select cfte0 in the shapes drop down box

4.)select point on tile to add cfte0(spawn point) add press the add button
in the OE

5.)rotate cfte0 in the direction you want the entry point to face when
player spawns.

6.) repeat 3-5 to add additonal spawn points...

7.)Set index order for all cfte0 to be lower than any other shape
objects on tile..

8.)Once tile is complete save tile (make sure you have the correct tile
properties set) and build the new shape. (note* It is  not recommended to
use any existing shp that has predefined spawns like 'medrwy'
and 'lrgrwy')..

9.)After building your shape copy the contents from your userlib directory
and newshapes directory to the texsrc directory of the map you want to
work on.

10.)Start the TE and place the new field on your map, you can use it as
many times as you want.  You must define the new fields/shps as a "Group
Master" otherwise the addspwn program will not convert the entry points
to it.

11.) Select Save in the TE and close the program.  

12.) Go to the directory where the map is saved.  Normally the map can be
found in the following directory c:\\program files\HTC\ah2editor\ahiiterr.
Look for your .oba file it should have the same name as your map. copy
this file to the empty directory where you placed the addspwn.exe

14.)copy the .til file that you created when using the OE  in the empty
directory where you placed the addspwn.exe.  This should be the same .til
file where you had added the cfte0.shp too..

15.) Run addspwn..  [.til name(required)] [.oba name(required)]
 
16.) Once the program finishes successfully, it will create an .oba.out file,  
the addspwn program will not/does not modify the existing .oba file.  If you
are satisfied with the changes made to the .oba.out file rename it to .oba
and copy it to your map folder.

17.)Start the TE load your map(it should do this by default if it was the last
one you already loaded) and build map.

18.) copy new map .res file to terrian diretory for the AH game and try out
your new fields and see if the entry points work out...



I would like to have some others try it out to see if it covers different scenerios so far it has worked ok for me...

What I will need for feed back is:

1.)  Did the entry points match up with the correct spawn locations for you while playing the map offline?
2.)  Did all entry points for bomber, vehicle, and fighter work correctly?

PM me with your email address and I will zip and send the program...

If someone knows of an easier way to setup custom entry points please feel free to share...

Thanks,,
« Last Edit: October 18, 2006, 03:43:14 PM by soda72 »

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #1 on: October 18, 2006, 02:44:17 PM »
entry point shape



top down view while in OE...


Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #2 on: October 18, 2006, 02:45:30 PM »
using in offline game....

I purposely left it visible to see if I was placed in the right spot...

« Last Edit: October 18, 2006, 03:03:22 PM by soda72 »

Offline Denholm

  • Plutonium Member
  • *******
  • Posts: 9667
      • No. 603 Squadron
Spawn Point creation on Custom Fields
« Reply #3 on: October 18, 2006, 04:58:27 PM »
PM me, I would like to try that since God's eye doesen't work for me in the TE anymore.
Get your Daily Dose of Flame!
FlameThink.com
No. 603 Squadron... Visit us on the web, if you dare.

Drug addicts are always disappointed after eating Pot Pies.

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #4 on: October 18, 2006, 06:08:28 PM »
To illustrate use...

Here is the object editor where I place three fighter entry points:


AFter doing the steps mentioned above... and going to my custom field in game...
the field now shows my entry points that I laid out...



now going to each spawn point...

frist hanger spawn [H]



next [NE]


last [SW]

« Last Edit: October 18, 2006, 06:37:39 PM by soda72 »

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #5 on: October 18, 2006, 10:20:46 PM »
Quote
Originally posted by Denholm
PM me, I would like to try that since God's eye doesen't work for me in the TE anymore.


download the program from here:

http://www.esnips.com/web/s0da72sBusinessFiles

The name of the file is called 10001addspwn.zip...

The zip file contains..
addspwn.exe
cfte0.shp
cbme0.shp
cvhe0.shp
10001smp.rtf

the .rtf has instructions
« Last Edit: October 18, 2006, 10:24:30 PM by soda72 »

Offline Denholm

  • Plutonium Member
  • *******
  • Posts: 9667
      • No. 603 Squadron
Spawn Point creation on Custom Fields
« Reply #6 on: October 19, 2006, 09:17:51 AM »
Alrighty, thanks a lot!
Get your Daily Dose of Flame!
FlameThink.com
No. 603 Squadron... Visit us on the web, if you dare.

Drug addicts are always disappointed after eating Pot Pies.

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #7 on: October 19, 2006, 11:06:18 AM »
Quote
Originally posted by Denholm
Alrighty, thanks a lot!


Yeah, that makes things a lot easier...



One thing to note if the field(shape) you want addspwn to modify arleady has entry points defined in the OBA file, they will be removed and replaced with the new ones generated.  This only affects the shape you specifiy other fields entry points defined in the .oba file are left alone and are not modified.

You can also create your own spawn shapes instead of the ones included, just make sure they are named the same like cfte0, cbme0, etc, for it to work.  Also if you don't want the entry point shapes included with your tile you can create a seperate tile to use only with the addspwn program.  There is a third parameter that the addspwn will take as the shp name.  This will allow you to use a OE .til file that is not related to a specific shp.  Once the oba file is generated with the entry points you no longer need the tile to include them.  However it's just easier to manage if it's all in one til file...  plus if the OE is changed to support spawn points it should be forward compatitble...
« Last Edit: October 19, 2006, 11:27:03 AM by soda72 »

Offline BlauK

  • Platinum Member
  • ******
  • Posts: 5091
      • http://www.virtualpilots.fi/LLv34/
Spawn Point creation on Custom Fields
« Reply #8 on: October 19, 2006, 02:59:28 PM »
A dumb question....

Why would you not place one base and all necessary spawns for it in TE, then save it as a shape group.. and then just lay these shape groups (of the base and spawns) all over the map where you want the bases.

Or do you mean that every base would be different?

(reclaimer: I do not know the TE all that well)


  BlauKreuz - Lentolaivue 34      


Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #9 on: October 19, 2006, 03:27:16 PM »
Quote
Originally posted by BlauK
A dumb question....

Why would you not place one base and all necessary spawns for it in TE, then save it as a shape group.. and then just lay these shape groups (of the base and spawns) all over the map where you want the bases.

Or do you mean that every base would be different?

(reclaimer: I do not know the TE all that well)


I don't know the TE all that well either...

That's why I mentioned this....

Quote
Originally posted by soda72
If someone knows of an easier way to setup custom entry points please feel free to share...


The group shape sounds a lot easier to use.

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #10 on: October 19, 2006, 03:39:17 PM »
Quote
Originally posted by BlauK
A dumb question....

Why would you not place one base and all necessary spawns for it in TE, then save it as a shape group.. and then just lay these shape groups (of the base and spawns) all over the map where you want the bases.

Or do you mean that every base would be different?

(reclaimer: I do not know the TE all that well)


Just tried it out...

It is easier, but my entry points are off in game,  the snap to grid isn't aligning th entry points correctly to the "group master"...  Is there an easy way to make sure the entry points align correctly when using "group shape"?  If there is it would be the best way to go... I tried the snap to grid but it seems to ignore it...


The addspwn always makes sure it's grid aligned correctly with the group master..
« Last Edit: October 19, 2006, 03:45:15 PM by soda72 »

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #11 on: October 19, 2006, 05:32:14 PM »
I futs around with the group shape for about an hour but couldn't get it to work.  It does save the entry points, but as soon as I press the add shape/group button it places all the entry points but they are no longer aligned with the group master.  If anyone has done this before and has some simple steps to make it work each time, it would be greatly appriciated.

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
Spawn Point creation on Custom Fields
« Reply #12 on: October 19, 2006, 11:34:24 PM »
I forgot about the ability to rotate objects in the TE...

I made a change to the program to account for rotation, otherwise the
only way to use it would be to have your field always pointing north..

Here is a pic of the field before rotation the heightlighted red dots are the entry points selected in the TE:


after rotation, entry points are no longer set correctly:


after rerunning addspwn against the .oba file to correct for rotation of object...
This also changes the direction of the actual spawn point to make sure they point the right direction for the game..


The new file is 10001addspwn2.zip



http://www.esnips.com/web/s0da72sBusinessFiles
« Last Edit: October 19, 2006, 11:40:07 PM by soda72 »

Offline Denholm

  • Plutonium Member
  • *******
  • Posts: 9667
      • No. 603 Squadron
Spawn Point creation on Custom Fields
« Reply #13 on: October 20, 2006, 08:47:25 AM »
NOTE: If you want to rotate your field without losing spawn point alignment when using the "Add Shape/Group" feature, select "Group Rotate", not "Rotate". That ensures all selected objects will be rotated on the same axis together.
Get your Daily Dose of Flame!
FlameThink.com
No. 603 Squadron... Visit us on the web, if you dare.

Drug addicts are always disappointed after eating Pot Pies.

Offline BlauK

  • Platinum Member
  • ******
  • Posts: 5091
      • http://www.virtualpilots.fi/LLv34/
Spawn Point creation on Custom Fields
« Reply #14 on: October 20, 2006, 11:56:50 AM »
Quote
Originally posted by soda72
...as soon as I press the add shape/group button it places all the entry points but they are no longer aligned with the group master.



Did you create a group of "all the spawns" or "all the spawns AND the base"?

I would suggest the latter, but I am not sure if it would solve the problem.


  BlauKreuz - Lentolaivue 34