This is documentation for OneHourOneLife. If you would like to add to the documentation you can do so by making a pull request. We will go over the game per folder.
This folder houses categorie files.
A categorie has the following attributes
variable name | description |
---|---|
parentID | parent ID |
numObjects | number of Objects |
[nameless] | multiple child Ids |
parentID and ChildId are also the ids of objects.
Child objects can be used in transitions which require the parent object.
file name: 367.txt
parentID=367
numObjects=12
132
131
66
64
67
68
69
107
390
344
496
498
This folder houses object files.
A object has the following attributes
variable name | description |
---|---|
id | |
[nameless] | name of the object |
containable | |
containSize | |
vertSlotRot | |
permanent | |
minPickupAge | |
heldInhand | |
blocksWalking | |
leftBlockingRadius | |
rightBlockingradius | |
drawBehindPlayer | |
mapChance | |
heatValue | The amount of heat generated by the object |
rValue | The amount of insulation(?) an object provides |
person | |
noSpawn | |
male | |
deathMarker | |
foodValue | |
speedMult | |
heldOffset | |
clothing | |
clothingOffset | |
deadlyDistance | |
useDistance | |
sounds | |
creationSoundInitialOnly | |
numSlots | |
slotSize | |
numSprites | The number of sprites. The next 8 lines are repeated once per sprite |
spriteID | |
pos | |
rot | |
hFlip | |
color | |
ageRange | |
parent | |
invisHolding | |
invisWorn | |
behindSlots | |
headIndex | |
bodyIndex | |
backFootIndex | |
frontFootIndex | |
numUses | |
useVanishIndex | |
useAppearIndex | |
pixHeight |
Objects can be used in transistions to create other objects
file name: 33.txt
id=33
Stone
containable=1
containSize=1,vertSlotRot=-0.250000
permanent=0,minPickupAge=3
heldInHand=1
blocksWalking=0,leftBlockingRadius=0,rightBlockingRadius=0,drawBehindPlayer=0
mapChance=1.000000#biomes_0,3
heatValue=0
rValue=0.000000
person=0,noSpawn=0
male=0
deathMarker=0
foodValue=0
speedMult=1.000000
heldOffset=5.000000,-5.000000
clothing=n
clothingOffset=0.000000,0.000000
deadlyDistance=0
useDistance=1
sounds=-1:0.250000,-1:0.250000,-1:0.250000,-1:1.000000
creationSoundInitialOnly=0
numSlots=0#timeStretch=1.000000
slotSize=1
numSprites=1
spriteID=144
pos=0.000000,-31.000000
rot=0.000000
hFlip=0
color=1.000000,1.000000,1.000000
ageRange=-1.000000,-1.000000
parent=-1
invisHolding=0,invisWorn=0,behindSlots=0
headIndex=-1
bodyIndex=-1
backFootIndex=-1
frontFootIndex=-1
numUses=1
useVanishIndex=-1
useAppearIndex=-1
pixHeight=0
This folder houses object files.
There are diffrent kind of transistion files.
The first two variables always come from the filename, and the other 1-9 variables are parsed according to this pattern: %d %d %d %f %f %d %d %d %d
place | variable name | description |
---|---|---|
first variable in file name | actor | required object 1 |
second variable in file name | target | required object 2 |
first variable in file | newActor | result object 1 |
second variable in file | newTarget | result object 2 |
third variable in file | autoDecaySeconds | time in seconds |
fourth variable in file | actorMinUseFraction | |
fifth variable in file | targetMinUseFraction | |
sixth variable in file | reverseUseActorFlag | |
seventh variable in file | reverseUseTargetFlag | |
eigth variable in file | move | |
ninth variable in file | desiredMoveDist |
https://github.com/jasonrohrer/OneLife/blob/master/gameSource/transitionBank.cpp
Old format, alias for LT
I don't know "Last use of target"
I don't know "Last use of Actor" ###Example
I have made a algorithm which uses the transition file to create a tree of transitions. The algorithm starts by assigning each object a step(called recipeTier in code). Step 0 is the once we find in nature. Step 1 is the items we can create with step 0. Step 2 builds on that. This should be done before hand.
Generation of the tree
- Receive an object id
- Find all the transitions which create the object
- Find the transitions which has the lowest variable for max(required1->step,required2->step)
- Save the transition in a global variable
- Do step 5 for both required objects
- If the step is higher then 1 go to 1.
- You will now have all the tranistions relate to the object id.