How to increase pallet spawn area factory

Your forum for all discussions around Modding.
Banijssen
Posts: 5
Joined: Sat Mar 11, 2023 6:04 pm

How to increase pallet spawn area factory

Post by Banijssen »

Hello,

I am getting better at editing xml's and the Giants Editor program, but I am still a beginner.

But I was wondering, I have this beer factory now, and only 8 pallets at a time can spawn. Cannot in some manner increase the pallet spawn area, so that is that area marked with yellow and black corners. I would love to have much bigger areas, where perhaps dozens of pallets can spawn at the same time.

If anybody knows, please le me know.

Greetings,

Boudewijn
XPModder
Posts: 77
Joined: Thu Oct 30, 2014 2:45 pm

Re: How to increase pallet spawn area factory

Post by XPModder »

Hi,

Increasing the pallet spawn area is relatively simple. The area is defined by transforms groups in the i3d. If you open the i3d of your factory in the giants editor, look for a transform group called something like 'palletSpawner' in the scenegraph. You can have multiple spawner areas defined. Each spawner area is defined by a start end end point. Inside that transform group you will find further transform groups which are the start points and each start point has an end point under/in it. Imagine a line drawn from the location of the start point to the location of the corresponding end point. Pallets can spawn all along this line.
To increase the are where pallets can spawn, you can do two things:
1. Move the start and end points further apart. eg if the end point is currently 10m away from its start point, move it to 15 or 20m away, if thats possible.
2. Create additional spawn areas. You can create additional new start and end points eg by duplicating (ctrl+d) an existing one or by creating new transform groups. Then move the start point to the desired location and make sure the end point is correctly in the start point in the scenegraph. Move the end point as far away or as close as you want to the start point. Save the i3d and open the xml file. In the xml file in the '<spawnPlaces>' tag there has to be one tag '<spawnPlace startNode="something"/>' for each pair of start and end points in the i3d. The 'something' is the name for the start node, which is defined in the i3dMapping section of the xml. If you add new spawn places, you have to add the start nodes to the i3dMapping section in the xml when you add the spawnPlace tag. Make sure that different start nodes have different names (eg spawnPlace1Start and spawnPlace2Start, etc). In the i3dMapping section make sure the index path (the thing in node="", looking something like 0>0|1|0) is correct. You can find the value that needs to be there in the Giants Editor in the attributes panel. Select the start node in the scenegraph and look in the attributes panel. There you will find the Index Path field. Copy the content of that field and paste it between the quotes after node in the i3dMapping in the xml.
The game automatically determines how many pallets can fit between the start and end point of each spawn place, so you only have to specify these two points.
Note that these points need to end up on or just above the ground ingame, because the game will check for space between these points when trying to spawn a pallet. If the points are high up in the air, the game is just going to spawn pallets up there and they will fall down.

Making the yellow and black corners match the new bigger spawn area is more complicated. Luckily they are purely visual and have no function. Thus the game will spawn pallets outside this marked area if there is a spawn place defined by the start and end point outside that area. Unfortunately in all the base game productions all 4 of these yellow and black striped corners are a single shape, meaning you cant move just one or two of these corners, only all of them at once. You could scale them, but if you scale that shape by 2 in say x direction, they will be roughly twice as far apart in that direction, but some of the sides of the corners will also be twice as wide as they were before, making them look a bit odd.
The only way to separate these corners would be to export the shape as an obj, open that in a 3d modeling software like Maya or Blender, separating the corners into separate meshes in the modeling software and then exporting them as separate meshes into an i3d again. Maybe check the prefabs on modHub, if someone already did that...

I hope I could help you a bit. :)
Das Universum ist unvorstellbar groß und wir sind im Vergleich dazu winzig.

Daher kann mir jemand der unter uns Winzlingen Unterschiede in Hautfarbe oder Herkunft sucht, nur Leid tun, weil seine Sichtweise so begrenzt ist!

Fremdenfeindlichkeit ist Menschenfeindlichkeit!
Post Reply