Need documentation inorder to get custom badnik working

Status
Not open for further replies.

glaber

Emblem Radar Ready
recently I tried getting my Motobug working in 2.1 without any documentation. So in doing that I wound up some how overwriting the blue crawla or just causing it not to be useable.

I even double checked in object place.

Maybe I'm starting too early, but at the moment I don't have a way to use socedit from 2.0.6 to make a clone of a crawla's soc and figure out how things work now.

This is my current soc for motobug
Code:
#Motobug!
Thing motobug
MAPTHINGNUM = 4031
SPAWNSTATE = 1858
SPAWNHEALTH = 1
SEESTATE = 1860
SEESOUND = 0
REACTIONTIME = 32
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 200
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 1641
DEATHSOUND = 119
XDEATHSTATE = 0
SPEED = 7
RADIUS = 1572864
HEIGHT = 2097152
MASS = 100
DAMAGE = 0
ACTIVESOUND = 0
RAISESTATE = 0
FLAGS = 16777221

FRAME 1858
SPRITENUMBER = 254
SPRITESUBNUMBER = 0
DURATION = 3
NEXT = 1859
ACTION A_Look

FRAME 1859
SPRITENUMBER = 254
SPRITESUBNUMBER = 0
DURATION = 3
NEXT = 1858
ACTION A_Look

FRAME 1860
SPRITENUMBER = 254
SPRITESUBNUMBER = 0
DURATION = 5
NEXT = 1861
ACTION A_Chase

FRAME 1861
SPRITENUMBER = 254
SPRITESUBNUMBER = 1
DURATION = 5
NEXT = 1860
ACTION A_Chase
 
Actually I tried to port many SOCs but without any documentation, we can consider this is impossible, the only thing that haven't changed is the level design (Tried all my levels wads). This is really frustrting because I will have to redo entierely the boss I have planned for the end of my level for the OLDC :/.

Maybe something that can port SOC from 2.0 to 2.1 could be cool.
 
This is really frustrting because I will have to redo entierely the boss I have planned for the end of my level for the OLDC :/.
You do realize that the OLDC deadline for the first 2.1 contest isn't for three months, right? A little patience would be appreciated, as we have a lot of bugs and other things to handle right now.
 
You do realize that the OLDC deadline for the first 2.1 contest isn't for three months, right? A little patience would be appreciated, as we have a lot of bugs and other things to handle right now.

Just said that because the boss was ready before I started the level.
 
For a start, your Object names need to have the "MT_" prefix before them to work. You *can* also give your states (and even sprites) names too now, thing/state/sprite numbers are worthless now considering the SOC list pages haven't been updated yet AND the point of naming them is to prevent clashes with other SOCs anyway.

And most importantly you must have a freeslot block before the thing/state definitions so the game doesn't complain that they don't exist, like this:

FREESLOT
MT_THING
S_STATE
SPR_SPRT

Note that custom sprites MUST have four letters after SPR_, as with all the vanilla SRB2 sprite names.
 
ok I think I can guess at how to use these.

The free slot bock is ment to go before each custom thing you make right?
and this block is used like most programming languages where you declare your variables?
 
Ok, I got it working but with 1 small problem left. Jumping on the motobug now doesn't give the player any bounce.

I'm thinking there's a flag I'm missing.

Current soc:
Code:
#Motobug!
FREESLOT
MT_motobug
S_MOTO_STND
S_MOTO_STND2
S_MOTO_RUN
S_MOTO_RUN2
SPR_MOTO

Thing MT_motobug
MAPTHINGNUM = 4016
SPAWNSTATE = S_MOTO_STND
SPAWNHEALTH = 1
SEESTATE = S_MOTO_RUN
SEESOUND = 0
REACTIONTIME = 32
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 200
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = S_XPLD1
DEATHSOUND = sfx_pop
XDEATHSTATE = 0
SPEED = 7
RADIUS = 1572864
HEIGHT = 2097152
MASS = 100
DAMAGE = 0
ACTIVESOUND = 0
RAISESTATE = 0
FLAGS = MF_SPECIAL; MF_SHOOTABLE; MF_ENEMY

FRAME S_MOTO_STND
SPRITENUMBER = MOTO
SPRITESUBNUMBER = 0
DURATION = 3
NEXT = S_MOTO_STND2
ACTION A_Look

FRAME S_MOTO_STND2
SPRITENUMBER = MOTO
SPRITESUBNUMBER = 0
DURATION = 3
NEXT = S_MOTO_STND
ACTION A_Look

FRAME S_MOTO_RUN
SPRITENUMBER = MOTO
SPRITESUBNUMBER = 0
DURATION = 5
NEXT = S_MOTO_RUN2
ACTION A_Chase

FRAME S_MOTO_RUN2
SPRITENUMBER = MOTO
SPRITESUBNUMBER = 1
DURATION = 5
NEXT = S_MOTO_RUN
ACTION A_Chase
 
Last edited:
To be clear, the resource names are just labels for numbers... some of them are always the same number, some of them are assigned a number by SRB2 when the SOC is loaded. At the end of the day, each field has a number in it, just like it always did, it's just that it's more readable to you, and SRB2 handles placement of slots to prevent conflicts.

So that said, when you write "FLAGS = MF_SPECIAL; MF_SHOOTABLE; MF_ENEMY", this can't resolve to a number. MF_SPECIAL, MF_SHOOTABLE, and MF_ENEMY can individually do so, but a semicolon isn't a mathematical operation; SRB2 does not know what to do with 3 numbers separated by semicolons. What you want to do is add the flags together; normally we'd use addition for this(+), but since we're dealing with flags it's more appropriate to use bitwise OR(|) which is LIKE addition, but prevents duplicate flags from adding up and being mistaken for flags that were never involved.

So you should write this in as "FLAGS = MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY".
 
Last edited:
Ahh, I just grabbed the formatting from the blue crawla's wiki entry.

changing the ; to a | worked perfectly. Using Motobug as a base of reference now, I should be able to get all my other custom objects up and working
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top