Aligning size-1 buildings with "default" size-2 grid?

Everything about mods can be found here.

Moderator: Morax

Aligning size-1 buildings with "default" size-2 grid?

Postby vxu » 19 Jan 2014, 05:10

Hello,

I have started looking into modding a bit and I am stuck with the following problem: I want to change blueprints such that the skirt of size-1 buildings like a wall or tech1-pointDefense are aligned with the "default" grid of size-2 buildings. E.g. a wall cannot be placed directly adjacent next to a MEX or a tech2-PD, it is always .5 off. I would like to be able to place 2 size-1 buildings touching the side of a size-2 building, e.g. 2 mini-mass-storages on one side of a MEX.

I tried changing SkirtSize, SkirtOffset and Footprint.Size but to no success.

When I aligned the skirt correctly (e.g. skirt =1, offset=-.5) the building itself was not centered in the skirt anymore.

Any ideas? What am I missing? Thanks!

Image

And some nooby dev questions:
Can i also changed blueprints live in game using the console? How?
Is there a way to "debug" LUA scripts? E.g. when i have an error in my mod script (e.g. nil reference, ...) the game just crashes, but i dont get told the line number or even the file (myfile) that caused the problem...
vxu
Crusader
 
Posts: 16
Joined: 29 Dec 2013, 18:21
Has liked: 1 time
Been liked: 0 time

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby errorblankfield » 20 Jan 2014, 04:36

Can we just align them in the normal game?

It drives my OCD crazy. O_O
errorblankfield
Priest
 
Posts: 409
Joined: 15 Mar 2013, 16:21
Has liked: 7 times
Been liked: 11 times
FAF User Name: errorblankfield

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby Domino » 20 Jan 2014, 20:17

i find it best to align them correctly in 3ds max at dead centre of world 0,0,0, then use small offsets in the bp if any are needed.
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby Domino » 20 Jan 2014, 20:20

there is a blueprint editor in game i think its shift f6 or something with /debug enabled command line switch and cheats enabled in game.
theres no way to bebug such an error, in time you wont make those errors, but its best in the beginning at learning to save and restart regular,
this way you can easly track what you changed your self.

its a process we all learn :)
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby Sulo » 20 Jan 2014, 20:34

From mapmaker point of view - all mexes and hydros are placed on coordinates with .5 otherwise decal on ground is not aligned with the building itself.

That would mean that 2x2, 4x4, 6x6 and so on buildings are centered to .5 coord and 3x3, 5x5... to .0

Howewer the 1x1 buildings are exception, they are odd numbers but are centered to .5 and thus creating the gap.

Or using another point of view - 1x1 buildings have their top left corner at .0 and larger buildings have it at .5
A bit easier huh.
Sulo
Avatar-of-War
 
Posts: 71
Joined: 28 Dec 2013, 20:40
Has liked: 0 time
Been liked: 6 times
FAF User Name: Sulo

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby Hawkei » 07 Feb 2014, 06:04

Well it does makes sense. Only the building centroid is aligned with the grid. Meaning that direct adjacency with odd or even sized structures is not possible. Say for instance you had a Size 3 structure (of which there are none in the game) it would be incapable of adjacency with any economic structures.

Size 1 = PD, AA, wall
Size 2 = T2 Defences, T1 Pgen, T2 Mex, Fab, Radar, etc.
Size 4 = SMD
Size 6 = Hydro, T2 Pgen, Shields, T3 Fab, Nuke
Size 8 = LFac, AFac, T3 Pgen, T3 Arty

The only way to make a Size 1 and Size 2 adjacent would be to modify the Size 1 BP to somehow lock to half grid point locations.
User avatar
Hawkei
Supreme Commander
 
Posts: 1217
Joined: 03 Jun 2013, 18:44
Location: A rather obscure planet in a small cluster of stars on the outer edge of the Milky Way Galaxy
Has liked: 44 times
Been liked: 182 times
FAF User Name: Firewall

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby vxu » 07 Feb 2014, 13:57

ah, that makes sense now. so the origin 0,0,0 is always in the middle of a 1x1 field, right?

well, with the skirt offset i can move the skirt, but i dont know of any way to also move the building...
vxu
Crusader
 
Posts: 16
Joined: 29 Dec 2013, 18:21
Has liked: 1 time
Been liked: 0 time

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby Sulo » 07 Feb 2014, 19:39

Hawkei wrote:Well it does makes sense. Only the building centroid is aligned with the grid. Meaning that direct adjacency with odd or even sized structures is not possible. Say for instance you had a Size 3 structure (of which there are none in the game) it would be incapable of adjacency with any economic structures.

Size 1 = PD, AA, wall
Size 2 = T2 Defences, T1 Pgen, T2 Mex, Fab, Radar, etc.
Size 4 = SMD
Size 6 = Hydro, T2 Pgen, Shields, T3 Fab, Nuke
Size 8 = LFac, AFac, T3 Pgen, T3 Arty

The only way to make a Size 1 and Size 2 adjacent would be to modify the Size 1 BP to somehow lock to half grid point locations.


SMD is 3x3 not 4x4 that is why it leaves that ugly L-shaped hole in your grid.


vxu wrote:ah, that makes sense now. so the origin 0,0,0 is always in the middle of a 1x1 field, right?

well, with the skirt offset i can move the skirt, but i dont know of any way to also move the building...



Well, like I said before it depends on structure size, see this:

Image

Black lines are coordinates with .0 (so 1, 2, 3, 4 etc), blue boxes show 1x1, 2x2, 3x3 and 4x4 structures and blue dots show where are they centered.

But still, I think only structure with odd numbered size is SMD with its 3x3 so your statement is almost 100% true :)


Long story short - you want to change 1x1 buildings to work the same way as 3x3 work, only smaller, so look into SMD model or blueprint (not a modder :D) and see how it works.
Sulo
Avatar-of-War
 
Posts: 71
Joined: 28 Dec 2013, 20:40
Has liked: 0 time
Been liked: 6 times
FAF User Name: Sulo

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby necxelos » 16 Feb 2014, 20:07

errorblankfield wrote:Can we just align them in the normal game?

It drives my OCD crazy. O_O


+1 for that

Either align size-1 thingy's to half a grid or enlarge them to be size-2 objects.
Supreme Commander FAF, Supreme Commander 2 RVE, Planetary Annihilation: Titans - those are only good RTS games left!
User avatar
necxelos
Avatar-of-War
 
Posts: 145
Joined: 12 Feb 2014, 04:27
Has liked: 0 time
Been liked: 1 time
FAF User Name: necxelos

Re: Aligning size-1 buildings with "default" size-2 grid?

Postby Hawkei » 17 Feb 2014, 04:15

Sulo,

I note with your diagram that the SMD is a size 3 structure. Which has been offset to allow adjacency with 2, 4, 6, 8 and 10 sizes. Wouldn't it be possible to do this with size one structures? Such as PD, AA and wall sections?
User avatar
Hawkei
Supreme Commander
 
Posts: 1217
Joined: 03 Jun 2013, 18:44
Location: A rather obscure planet in a small cluster of stars on the outer edge of the Milky Way Galaxy
Has liked: 44 times
Been liked: 182 times
FAF User Name: Firewall

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest