Closed UltiNaruto closed 2 weeks ago
Non required mains seeds need to set unknown1 (which is Unknown Item 2) in starting items to 12 (4 | 8 => Missile Launcher | Power Bomb Launcher).
If you only require mains for missile then it is 8. If you only require mains for PB then it is 4.
Migrated Ice Trap from Special Function to Pickup and it doesn't require enable_ice_trap in config anymore
@UltiNaruto PLEASE do not force-push when updating your changes. It makes it hard for me to incrementally review your work (otherwise I have to double over all lines of your code each feedback iteration)
Actually, I forgot you may have told me a way to see the old code for force push. It might be fine
So things are less confusing moving forwards, can you rename
unknown0
andunknown1
inspawn_point.rs
tounknown1
andunknown2
? We should be consistent with where we start count from and I think it's pretty well established we start at 1 when talking about inventory items,Make sure the JSON input also reflects this change.
unknown1
or unknownItem1
?
unknownItem1
Actually, @UltiNaruto we should deprecated game_config.spring_ball
and default game_config.spring_ball_item
to the custom pickup.
Sorry for the flip flop, caffine still kicking in
Actually, @UltiNaruto we should deprecated
game_config.spring_ball
and defaultgame_config.spring_ball_item
to the custom pickup.Sorry for the flip flop, caffine still kicking in
Would it perhaps be preferable to default it to bombs, for backwards compatibility?
To preserve backwards compatibility, make it so that springBall: true
sets springBallItem: Bombs
.
I thought about another idea. What about making springBall
default to false
and if it's set to true
with a pickup having SpringBall
as its type then it complains about both being used?
springBall
would remain useable and not deprecated but using both makes the patcher panic with the following message Use either springBall or add a pickup as SpringBall type
As for using SpringBall
type for pickups, it would detect it then change springBall
to true
and springBallItem
to SpringBall
.
@UltiNaruto I really think this is the best option, please implement it:
springBall
in the JSON schema and remove all if config.spring_ball
conditionsspringBallItem
to the JSON schema with "default": "Spring Ball"
let spring_ball_item = match spring_ball_item {
Some(spring_ball_item) => spring_ball_item,
None => {
match spring_ball {
false => "Spring Ball",
true => "Morph Ball Bombs",
}
},
}
Up to you. I'll do that then.
I'm pretty happy with the code but in my testing
startingItems
isn't working. Please check using this JSON file which should start with all the custom items.{ "$schema": "./schema/randomprime.schema.json", "gameConfig": { "startingRoom": "Tallon Overworld:Arbor Chamber", "startingItems": { "combatVisor": true, "powerBeam": true, "scanVisor": true, "missiles": 10, "energyTanks": 0, "powerBombs": 8, "wave": false, "ice": false, "plasma": false, "charge": false, "morphBall": true, "bombs": false, "spiderBall": false, "boostBall": false, "powerSuit": 0, "variaSuit": false, "gravitySuit": false, "phazonSuit": false, "thermalVisor": false, "xray": false, "spaceJump": true, "grapple": false, "superMissile": false, "wavebuster": false, "iceSpreader": false, "flamethrower": false, "unknownItem1": 0, "unlimitedMissiles": true, "unlimitedPowerBombs": true, "missileLauncher": true, "powerBombLauncher": true, "springBall": true } }, "levelData": { "Tallon Overworld": { "rooms": { "Arbor Chamber": { "pickups": [ { "type": "Spring Ball" }, { "type": "Main Power Bomb", "position": [-723.6977, 334.1136, 40.2428] }, { "type": "Missile Launcher", "position": [-723.6977, 329.1136, 40.2428] }, { "type": "Unlimited Missiles", "position": [-723.6977, 344.1136, 40.2428] }, { "type": "Unlimited Power Bombs", "position": [-723.6977, 349.1136, 40.2428] } ] } } } } }
Also, please update use the struct to define starting items rather than
u64
so that the player spawns with missile/pb launcher if left unspecifiedlet starting_items = { let items = self.game_config.starting_items.as_ref(); match items { Some(items) => items.clone(), None => { if force_vanilla_layout { StartingItems::from_u64(2188378143) } else { StartingItems::from_u64(1) } } } };
don't forget to add item max capacity 2^31 else unknown item 2 cannot be set since it defaults to 0 max
{
"$schema": "./schema/randomprime.schema.json",
"gameConfig": {
"startingRoom": "Tallon Overworld:Arbor Chamber",
"startingItems": {
"combatVisor": true,
"powerBeam": true,
"scanVisor": true,
"missiles": 10,
"energyTanks": 0,
"powerBombs": 8,
"wave": false,
"ice": false,
"plasma": false,
"charge": false,
"morphBall": true,
"bombs": false,
"spiderBall": false,
"boostBall": false,
"powerSuit": 0,
"variaSuit": false,
"gravitySuit": false,
"phazonSuit": false,
"thermalVisor": false,
"xray": false,
"spaceJump": true,
"grapple": false,
"superMissile": false,
"wavebuster": false,
"iceSpreader": false,
"flamethrower": false,
"unknownItem1": 0,
"unlimitedMissiles": true,
"unlimitedPowerBombs": true,
"missileLauncher": true,
"powerBombLauncher": true,
"springBall": true
},
"itemMaxCapacity": {
"Unknown Item 2": 2147483647
}
},
"levelData": {
"Tallon Overworld": {
"rooms": {
"Arbor Chamber": {
"pickups": [
{
"type": "Spring Ball"
},
{
"type": "Main Power Bomb",
"position": [-723.6977, 334.1136, 40.2428]
},
{
"type": "Missile Launcher",
"position": [-723.6977, 329.1136, 40.2428]
},
{
"type": "Unlimited Missiles",
"position": [-723.6977, 344.1136, 40.2428]
},
{
"type": "Unlimited Power Bombs",
"position": [-723.6977, 349.1136, 40.2428]
}
]
}
}
}
}
}```
@UltiNaruto the default max capacity for unknown2 should change then because that was really unintuitive
fixed the starting custom item issue
@UltiNaruto the default max capacity for unknown2 should change then because that was really unintuitive
Defaults to 1 in the schema
Do we want just to change the schema or add unknown item 2 if it's not specified in patch_config.rs?
We'll need to always patch unknown_item_2 regardless if it's in the JSON or not.
I'm defining "backwards compatible" here as "not fundamentally changing the behavior of explicitly named JSON properties". That means changing the default value used for an unspecified property is a non-breaking change.
now the patch config will auto add Unknown Item 2 with the correct value if it's not specified. also I fixed the negative capacity patch for custom items which will properly remove the custom item.
Fixed it. It was just missing a value & 1 to prevent the value to be higher than 1.
It works as intended for underwater remove floaty but it does +2 for fluid count when picking up non removal one. I'll fix that one.
Well nvm it wasn't recompiled to latest version. I'll add a out of water ticks check to fluid count decrement.
Required mains supported for Missiles/PB Unlimited Missiles/PBs are supported now Spring Ball has its own item now