Include finalized Ironbun map plus finished script
This commit is contained in:
parent
9b922c4eaf
commit
55ee14ee2a
129
Ironbun.CT
Normal file
129
Ironbun.CT
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<CheatTable CheatEngineTableVersion="45">
|
||||||
|
<CheatEntries>
|
||||||
|
<CheatEntry>
|
||||||
|
<ID>0</ID>
|
||||||
|
<Description>"No description"</Description>
|
||||||
|
<LastState Value="118" RealAddress="19F8BDE8"/>
|
||||||
|
<ShowAsSigned>0</ShowAsSigned>
|
||||||
|
<VariableType>4 Bytes</VariableType>
|
||||||
|
<Address>rabiribi.exe+01682364</Address>
|
||||||
|
<Offsets>
|
||||||
|
<Offset>4F0</Offset>
|
||||||
|
</Offsets>
|
||||||
|
</CheatEntry>
|
||||||
|
<CheatEntry>
|
||||||
|
<ID>1</ID>
|
||||||
|
<Description>"No description"</Description>
|
||||||
|
<LastState Value="0" RealAddress="021B7CE8"/>
|
||||||
|
<ShowAsSigned>0</ShowAsSigned>
|
||||||
|
<VariableType>4 Bytes</VariableType>
|
||||||
|
<Address>rabiribi.exe+0x1637CE8</Address>
|
||||||
|
</CheatEntry>
|
||||||
|
</CheatEntries>
|
||||||
|
<UserdefinedSymbols/>
|
||||||
|
<LuaScript>erinaCostume = readInteger("rabiribi.exe+167CFB4")
|
||||||
|
ribbonCostume = readInteger("rabiribi.exe+167CFB8")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print("Started Bun")
|
||||||
|
|
||||||
|
writeInteger("rabiribi.exe+167CFB4",5*65536)
|
||||||
|
writeInteger("rabiribi.exe+167CFB8",6)
|
||||||
|
|
||||||
|
maxHealthPointer=readPointer("rabiribi.exe+01682364")+0x4F0
|
||||||
|
healthPointer=readPointer("rabiribi.exe+01682364")+0x4E0
|
||||||
|
currentHealth=50
|
||||||
|
currentMaxHealth=50
|
||||||
|
currentDonutCount=0
|
||||||
|
currentCakeCount=0
|
||||||
|
characterData={1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1}
|
||||||
|
townMember={false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false}
|
||||||
|
characterStartAddr=0x1637CCC
|
||||||
|
waitForReset=false
|
||||||
|
confirmTimes=10
|
||||||
|
skipItemCheck=false
|
||||||
|
os.remove("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Rabi-Ribi\\custom\\Ironbun\\save\\save0.sav")
|
||||||
|
|
||||||
|
function update(timer)
|
||||||
|
consumedItem=false
|
||||||
|
skipItemCheck=false
|
||||||
|
for i, char in ipairs(characterData) do
|
||||||
|
if (townMember[i]==false and readInteger("rabiribi.exe+"..string.format("%x",characterStartAddr+4*i))==1) then
|
||||||
|
townMember[i]=true
|
||||||
|
if (characterData[i]==1) then
|
||||||
|
print("Add Cake")
|
||||||
|
currentCakeCount=currentCakeCount+1
|
||||||
|
writeInteger("rabiribi.exe+167303C",currentCakeCount)
|
||||||
|
skipItemCheck=true
|
||||||
|
else
|
||||||
|
currentDonutCount=currentDonutCount+1
|
||||||
|
print("Add Donut")
|
||||||
|
writeInteger("rabiribi.exe+1673038",currentDonutCount)
|
||||||
|
skipItemCheck=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (currentDonutCount-readInteger("rabiribi.exe+1673038")==1 and skipItemCheck==false) then
|
||||||
|
currentDonutCount=readInteger("rabiribi.exe+1673038")
|
||||||
|
consumedItem=true
|
||||||
|
if (math.floor(currentHealth+currentMaxHealth*0.2)<currentMaxHealth) then
|
||||||
|
currentHealth=math.floor(currentHealth+currentMaxHealth*0.2)
|
||||||
|
else
|
||||||
|
currentHealth=currentMaxHealth
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (currentCakeCount-readInteger("rabiribi.exe+167303C")==1 and skipItemCheck==false) then
|
||||||
|
currentCakeCount=readInteger("rabiribi.exe+167303C")
|
||||||
|
consumedItem=true
|
||||||
|
if (math.floor(currentHealth+currentMaxHealth*0.7)<currentMaxHealth) then
|
||||||
|
currentHealth=math.floor(currentHealth+currentMaxHealth*0.7)
|
||||||
|
else
|
||||||
|
currentHealth=currentMaxHealth
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (readInteger(maxHealthPointer)==50 and waitForReset==false) then
|
||||||
|
if (confirmTimes>0) then
|
||||||
|
confirmTimes=confirmTimes-1
|
||||||
|
else
|
||||||
|
currentHealth=50
|
||||||
|
currentMaxHealth=50
|
||||||
|
currentDonutCount=0
|
||||||
|
currentCakeCount=0
|
||||||
|
waitForReset=true
|
||||||
|
print("RESET")
|
||||||
|
os.remove("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Rabi-Ribi\\custom\\Ironbun\\save\\save0.sav")
|
||||||
|
townMember={false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false}
|
||||||
|
end
|
||||||
|
return
|
||||||
|
else
|
||||||
|
confirmTimes=10
|
||||||
|
if (readInteger(healthPointer)==0 and waitForReset==true) then
|
||||||
|
print("Ded")
|
||||||
|
os.remove("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Rabi-Ribi\\custom\\Ironbun\\save\\save0.sav")
|
||||||
|
waitForReset=false
|
||||||
|
end
|
||||||
|
if (readInteger(healthPointer)<currentHealth and (readInteger(healthPointer)~=50) and (consumedItem==false)) then
|
||||||
|
currentHealth=readInteger(healthPointer)
|
||||||
|
end
|
||||||
|
if (readInteger(maxHealthPointer)>currentMaxHealth) then
|
||||||
|
print("Max Health increased: "..tostring(currentMaxHealth)..">"..tostring(readInteger(maxHealthPointer)))
|
||||||
|
currentHealth=currentHealth+readInteger(maxHealthPointer)-currentMaxHealth
|
||||||
|
currentMaxHealth=readInteger(maxHealthPointer)
|
||||||
|
print("Current Health: "..tostring(currentHealth).." / Max: "..tostring(currentMaxHealth))
|
||||||
|
end
|
||||||
|
writeInteger("rabiribi.exe+1673038",currentDonutCount)
|
||||||
|
writeInteger("rabiribi.exe+167303C",currentCakeCount)
|
||||||
|
writeInteger(healthPointer,currentHealth)
|
||||||
|
end
|
||||||
|
writeInteger("rabiribi.exe+16751C4",0)
|
||||||
|
end
|
||||||
|
|
||||||
|
healthSetTimer=createTimer(getMainForm())
|
||||||
|
healthSetTimer.setInterval(100)
|
||||||
|
healthSetTimer.setOnTimer(update)
|
||||||
|
healthSetTimer.setEnabled(true)
|
||||||
|
|
||||||
|
</LuaScript>
|
||||||
|
</CheatTable>
|
BIN
Ironbun/area0.map
Normal file
BIN
Ironbun/area0.map
Normal file
Binary file not shown.
BIN
Ironbun/area1.map
Normal file
BIN
Ironbun/area1.map
Normal file
Binary file not shown.
BIN
Ironbun/area11.map
Normal file
BIN
Ironbun/area11.map
Normal file
Binary file not shown.
BIN
Ironbun/area2.map
Normal file
BIN
Ironbun/area2.map
Normal file
Binary file not shown.
BIN
Ironbun/area3.map
Normal file
BIN
Ironbun/area3.map
Normal file
Binary file not shown.
BIN
Ironbun/area4.map
Normal file
BIN
Ironbun/area4.map
Normal file
Binary file not shown.
BIN
Ironbun/area5.map
Normal file
BIN
Ironbun/area5.map
Normal file
Binary file not shown.
BIN
Ironbun/area6.map
Normal file
BIN
Ironbun/area6.map
Normal file
Binary file not shown.
BIN
Ironbun/area7.map
Normal file
BIN
Ironbun/area7.map
Normal file
Binary file not shown.
BIN
Ironbun/area8.map
Normal file
BIN
Ironbun/area8.map
Normal file
Binary file not shown.
BIN
Ironbun/area9.map
Normal file
BIN
Ironbun/area9.map
Normal file
Binary file not shown.
BIN
Ironbun/save/save0.sav
Normal file
BIN
Ironbun/save/save0.sav
Normal file
Binary file not shown.
BIN
Ironbun/save/save0_a.bmp
Normal file
BIN
Ironbun/save/save0_a.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 MiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
78
modifyMap.js
78
modifyMap.js
@ -1,8 +1,7 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
mapData=[]
|
mapData=[]
|
||||||
|
files=["area0.json",
|
||||||
for (file of ["area0.json",
|
|
||||||
"area1.json",
|
"area1.json",
|
||||||
"area2.json",
|
"area2.json",
|
||||||
"area3.json",
|
"area3.json",
|
||||||
@ -12,12 +11,81 @@ for (file of ["area0.json",
|
|||||||
"area7.json",
|
"area7.json",
|
||||||
"area8.json",
|
"area8.json",
|
||||||
"area9.json",
|
"area9.json",
|
||||||
"area11.json"]) {
|
"area11.json"]
|
||||||
mapData=[...mapData,JSON.parse(fs.readFileSync(file))]
|
|
||||||
|
for (file of files) {
|
||||||
|
mapData=[...mapData,JSON.parse(fs.readFileSync("originals/"+file))]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
counter=0
|
||||||
for (data of mapData){
|
for (data of mapData){
|
||||||
|
counter2=0
|
||||||
for (layer of data.layers) {
|
for (layer of data.layers) {
|
||||||
console.log(layer.data)
|
console.log(layer.name+"["+counter2+"]")
|
||||||
|
if (layer.name=="event") {
|
||||||
|
counter3=0
|
||||||
|
for (object of layer.objects){
|
||||||
|
counter3++
|
||||||
|
if (object.name=="224"){
|
||||||
|
object.name="5001"
|
||||||
|
}
|
||||||
|
if (object.name=="42"){
|
||||||
|
object.name="5001"
|
||||||
|
}
|
||||||
|
if (object.name=="44"){
|
||||||
|
object.name="5001"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (layer.name=="items")
|
||||||
|
{
|
||||||
|
for (object of layer.objects)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
counter2++
|
||||||
|
}
|
||||||
|
counter++
|
||||||
|
}
|
||||||
|
|
||||||
|
//Level 3 powerups
|
||||||
|
for (var i=0;i<mapData.length;i++){
|
||||||
|
for (item of mapData[i].layers[9].objects){
|
||||||
|
if (Number(item.name)<96){
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x-32, y: item.y, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x-32, y: item.y-32, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x, y: item.y-32, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x, y: item.y+32, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x+32, y: item.y, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x+32, y: item.y+32, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x-32, y: item.y+32, name: '529' }]
|
||||||
|
mapData[i].layers[8].objects=[...mapData[i].layers[8].objects,{ width: 32, height: 32, x: item.x+32, y: item.y-32, name: '529' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
//Speed Boost Level 3 at town
|
||||||
|
for (var i=0;i<9;i++){
|
||||||
|
mapData[5].layers[8].objects=[...mapData[5].layers[8].objects,{ width: 32, height: 32, x: 5536, y: 4544-32*i, name: '558' }]
|
||||||
|
mapData[5].layers[8].objects=[...mapData[5].layers[8].objects,{ width: 32, height: 32, x: 5536+32, y: 4544-32*i, name: '5006' }]
|
||||||
|
mapData[5].layers[8].objects=[...mapData[5].layers[8].objects,{ width: 32, height: 32, x: 5536+64, y: 4544-32*i, name: '5003' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
//Amulet level 2
|
||||||
|
for (var i=0;i<13;i++){
|
||||||
|
mapData[8].layers[8].objects=[...mapData[8].layers[8].objects,{ width: 32, height: 32, x: 4512, y: 2784-32*i, name: '558' }]
|
||||||
|
mapData[8].layers[8].objects=[...mapData[8].layers[8].objects,{ width: 32, height: 32, x: 4512+32, y: 2784-32*i, name: '5033' }]
|
||||||
|
mapData[8].layers[8].objects=[...mapData[8].layers[8].objects,{ width: 32, height: 32, x: 4512+64, y: 2784-32*i, name: '5002' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
//Amulet level 3
|
||||||
|
for (var i=0;i<13;i++){
|
||||||
|
mapData[8].layers[8].objects=[...mapData[8].layers[8].objects,{ width: 32, height: 32, x: 11072, y: 2784-32*i, name: '558' }]
|
||||||
|
mapData[8].layers[8].objects=[...mapData[8].layers[8].objects,{ width: 32, height: 32, x: 11072+32, y: 2784-32*i, name: '5033' }]
|
||||||
|
mapData[8].layers[8].objects=[...mapData[8].layers[8].objects,{ width: 32, height: 32, x: 11072+64, y: 2784-32*i, name: '5003' }]
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//console.log(JSON.stringify(mapData[0]))
|
||||||
|
for (var i=0;i<files.length;i++){
|
||||||
|
fs.writeFileSync(files[i],JSON.stringify(mapData[i]))
|
||||||
|
}
|
1
originals/area0.json
Normal file
1
originals/area0.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area1.json
Normal file
1
originals/area1.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area11.json
Normal file
1
originals/area11.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area2.json
Normal file
1
originals/area2.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area3.json
Normal file
1
originals/area3.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area4.json
Normal file
1
originals/area4.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area5.json
Normal file
1
originals/area5.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area6.json
Normal file
1
originals/area6.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area7.json
Normal file
1
originals/area7.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area8.json
Normal file
1
originals/area8.json
Normal file
File diff suppressed because one or more lines are too long
1
originals/area9.json
Normal file
1
originals/area9.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user