With the help of helpful people in the IRC, I was able to use modulation to fix the offset problem.
I doubt it will work for anyone else without the exact, same, problem but here it is just in case:
CheckandMarkRoom(ValidationandMarking)Options:FunctionReturnType:BooleanParametersSizeX<Integer>SizeY<Integer>Point<Integer>Region<Integer>FacingOpposite<Real>CreationDirectionY<BasicCreationDirection>CreationDirectionX<BasicCreationDirection>GrammarText:CheckandMarkRoom(ValidationandMarking)(SizeX,SizeY,Point,Region,FacingOpposite,CreationDirectionY,CreationDirectionX)HintText:(None)CustomScriptCodeLocalVariablesCreationDirectionY<BasicCreationDirection>CreationDirectionX<BasicCreationDirection>i=0<Integer>x=0<Integer>FinalBoolean=True<Boolean>TileFlag=0<Integer>AdditionalOffset=0<Integer>ActionsPlayerGroup-Pickeachplayerin(ActivePlayers)anddo(Actions)ActionsSetaLoadingBarfor(Pickedplayer)containingthetext"DEBUG"withthemaximumprogressofbaronebeingSizeXandthemaximumprogressofthebartwobeingSizeY.Variable-SetCreationDirectionX=CreationDirectionXVariable-SetCreationDirectionY=CreationDirectionYGeneral-Switch(Actions)dependingonCreationDirectionYCasesGeneral-If(Down)ActionsGeneral-If(Left)ActionsGeneral-If(Right)ActionsDefaultGeneral-Switch(Actions)dependingonCreationDirectionXCasesGeneral-If(Left)ActionsGeneral-If(Up)ActionsGeneral-If(Down)ActionsDefaultGeneral-Foreachintegerxfrom0toSizeXwithincrement1,do(Actions)ActionsLoadingBar(Update)(1,Neutral,"Creating Room",0,0,i,x)General-Foreachintegerifrom0toSizeYwithincrement1,do(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Point+i)<=47(Region+x)<=83ThenLoadingBar(Update)(1,Neutral,"Creating Room",0,0,i,x)General-If(Conditions)thendo(Actions)elsedo(Actions)IfFlagofTile[(Region+x)][(Point+i)] == 0
Then
Else
Variable - Set Final Boolean = False
Else
Variable - Set Final Boolean = False
General - Wait 0.0 Game Time seconds
General - Wait 0.0 Game Time seconds
General - If (Conditions) then do (Actions) else do (Actions)
If
Final Boolean == True
Then
General - Switch (Actions) depending on Creation Direction Y
Cases
General - If (Down)
Actions
General - If (Left)
Actions
General - If (Right)
Actions
Default
General - Switch (Actions) depending on Creation Direction X
Cases
General - If (Left)
Actions
General - If (Up)
Actions
General - If (Down)
Actions
Default
General - For each integer x from 0 to Size X with increment 1, do (Actions)
Actions
Loading Bar (Update)(1, Neutral, "Creating Room", 0, 0, i, x)
General - For each integer i from 0 to Size Y with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(x mod 2) == 1
Then
Variable - Set Additional Offset = -1
Else
Variable - Set Additional Offset = 0
Loading Bar (Update)(1, Neutral, "Creating Room", 0, 0, i, x)
General - If (Conditions) then do (Actions) else do (Actions)
If
Or
Conditions
x == 0
x == Size X
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Or
Conditions
i == 0
i == Size Y
Then
Variable - Set Tile Flag = 2
Else
Variable - Set Tile Flag = 1
Else
Variable - Set Tile Flag = 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Or
Conditions
x == 0
x == Size X
Then
Variable - Set Flag of Tile[(Region+x)][(Point+i)] = Tile Flag
Else
Variable - Set Flag of Tile[(Region+x)][(Point+AdditionalOffset)] = Tile Flag
Variable - Set Flag of Tile[(Region+x)][(Point+(SizeY+AdditionalOffset))] = Tile Flag
General - Wait 0.0 Game Time seconds
General - Wait 0.0 Game Time seconds
Else
Variable - Set Final Boolean = False
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
So I am taking the advice of someone from that other thread and am going to post in pieces where I need help.
I've gotten pretty far along since then but hit a snag when trying to create my validation engine.
A quick rundown:
When a room is being created it has to validate that the points in questions aren't already occupied by tiles. So as not to intersect with walls of other rooms and doodads and what have you.
To do this, I need to go through the arduous task of creating tons of math to make sure:
The position isn't above or below the array (outside the map)
the position isn't nonexistent (where a point isn't occupied; near an entry door.)
And so on.
Right now, while I could use help with the whole thing, the only part really getting me is the picture section. It's a debug so that's why it's a function that creates things. Anyway.
Before continuing:
= wall tile
= corner tile
So as you can see, when I get in game not only are corner tiles overlapping wall tiles and vice-versa (corner tiles go in the, you guessed it, corner. As fillers to look nice), but one of the wall tiles even shifts down a position.
One thing I know is that the game catalogs the points in an odd fashion. The first unit to be cataloged into a point is the second in the row, and the second the first.
Normally this wouldn't matter but maybe fresh eyes will catch something I've been unable to.
Thanks in advance.
EDIT: A few things I missed at first.
there is also a(?) wall missing. It may be more, it's hard to tell.
testing takes upwards of 6 minutes because of the way the map initializes. I'll try to get back to people in one bulk post rather than individual posts. If I take a while keep this in mind.
there are 83 regions (or the X of the array) and 47 points per region (or the Y of the array)
in the more recent picture (same file name but I gave a description for this one) not only are most walls shifted up or down incorrectly, but corners just seem to spawn however they want.
my math skills are pretty bad, so please excuse any obvious errors and explain them as detailed as possible.
Pretty sure that's it. I'll edit in more if I remember more.
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
To post a comment, please login or register a new account.
@SoulTaker916: Go
With the help of helpful people in the IRC, I was able to use modulation to fix the offset problem.
I doubt it will work for anyone else without the exact, same, problem but here it is just in case:
So I am taking the advice of someone from that other thread and am going to post in pieces where I need help.
I've gotten pretty far along since then but hit a snag when trying to create my validation engine.
A quick rundown: When a room is being created it has to validate that the points in questions aren't already occupied by tiles. So as not to intersect with walls of other rooms and doodads and what have you. To do this, I need to go through the arduous task of creating tons of math to make sure:
Right now, while I could use help with the whole thing, the only part really getting me is the picture section. It's a debug so that's why it's a function that creates things. Anyway.
Before continuing:
So as you can see, when I get in game not only are corner tiles overlapping wall tiles and vice-versa (corner tiles go in the, you guessed it, corner. As fillers to look nice), but one of the wall tiles even shifts down a position.
One thing I know is that the game catalogs the points in an odd fashion. The first unit to be cataloged into a point is the second in the row, and the second the first.
Normally this wouldn't matter but maybe fresh eyes will catch something I've been unable to.
Thanks in advance.
EDIT: A few things I missed at first.
Pretty sure that's it. I'll edit in more if I remember more.