Skip to content

Commit

Permalink
Merge pull request #166 from gamrguy/master
Browse files Browse the repository at this point in the history
Automatic racial techs
  • Loading branch information
sayterdarkwynd authored Jul 20, 2019
2 parents 88bf537 + ec2ab55 commit 3268e10
Show file tree
Hide file tree
Showing 21 changed files with 100 additions and 107 deletions.
40 changes: 19 additions & 21 deletions player.config.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
[
{
"op": "remove",
"path": "/statusControllerSettings/resources/food/maxValue"
},
{
"op": "add",
"path": "/statusControllerSettings/resources/food/maxStat",
"value": "maxFood"
},
{
"op": "add",
"path": "/statusControllerSettings/stats/maxFood",
"value": {
"baseValue": 70
}
},
{ "op": "add", "path": "/defaultBlueprints/tier1/-", "value": {"item": "robosnax"} },
{ "op": "add", "path": "/defaultBlueprints/tier1/-", "value": {"item": "raceEffectEnabler"} },
{ "op": "add", "path": "/defaultBlueprints/tier1/-", "value": {"item": "meatkibble"} },
{ "op": "add", "path" : "/statusControllerSettings/primaryScriptSources/-" , "value" : "/scripts/raceEffects.lua" }

{
"op": "remove",
"path": "/statusControllerSettings/resources/food/maxValue"
},
{
"op": "add",
"path": "/statusControllerSettings/resources/food/maxStat",
"value": "maxFood"
},
{
"op": "add",
"path": "/statusControllerSettings/stats/maxFood",
"value": { "baseValue": 70 }
},
{ "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : {"item": "robosnax"} },
//{ "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : {"item": "raceEffectEnabler"} },
{ "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : {"item": "meatkibble"} },
{ "op" : "add", "path" : "/statusControllerSettings/primaryScriptSources/-" , "value" : "/scripts/raceEffects.lua" },
{ "op" : "add", "path" : "/companionsConfig/scripts/-", "value" : "/scripts/techHandler.lua" }
]
17 changes: 17 additions & 0 deletions scripts/techHandler.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
local FR_old_init = init

function init()
FR_old_init()
local species = player.species()
local _,speciesConfig = pcall( function () return root.assetJson(string.format("/species/%s.raceeffect", species)) end )
if speciesConfig and speciesConfig.tech then
for _,tech in pairs(speciesConfig.tech) do
local playerTechs = player.availableTechs()
player.makeTechAvailable(tech)
if #(player.availableTechs()) > #playerTechs then -- check to see if this added a tech (if not, we have it already)
player.enableTech(tech)
player.equipTech(tech)
end
end
end
end
3 changes: 2 additions & 1 deletion species/avali.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@
}
}
}
}
},
"tech" : [ "flight_avali" ]
}
3 changes: 2 additions & 1 deletion species/avian.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@
}
}
}
}
},
"tech" : [ "flight_avian" ]
}
5 changes: 2 additions & 3 deletions species/cat.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
]
}
],
"special": [
"headlampcat"
]
"special": [ "headlampcat" ],
"tech" : [ "veluuclaw" ]
}
3 changes: 2 additions & 1 deletion species/elduukhar.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,6 @@
],
"special": [
"elduukharBonus"
]
],
"tech" : [ "elduukharburst" ]
}
3 changes: 2 additions & 1 deletion species/felin.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@
}
]
}
]
],
"tech" : [ "huntersclaw" ]
}
3 changes: 2 additions & 1 deletion species/fenerox.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@
}],
"special": [
"darkregenfenerox"
]
],
"tech" : [ "huntersclaw" ]
}
3 changes: 2 additions & 1 deletion species/gyrusen.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@
"baseMultiplier": 1.15
}]
}
]
],
"tech" : [ "minersclaw" ]
}
3 changes: 2 additions & 1 deletion species/juux.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@
}
],
"weaponScripts": [],
"special": [ ]
"special": [ ],
"tech" : [ "juuxharden" ]
}
3 changes: 2 additions & 1 deletion species/kazdra.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@
}],
"special": [
"kazdraBonus"
]
],
"tech" : [ "dragonfireburst" ]
}
3 changes: 2 additions & 1 deletion species/moogle.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,6 @@
}
}
}
}
},
"tech" : [ "flight_moogle" ]
}
4 changes: 2 additions & 2 deletions species/nightar.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@
}
],

"special": [ "nightarglow3", "darkhunternightar", "drainnightar"]

"special": [ "nightarglow3", "darkhunternightar", "drainnightar"],
"tech" : [ "nightarconshak" ]
}
3 changes: 2 additions & 1 deletion species/novali.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,6 @@
}
}
}
}
},
"tech" : [ "flight_avali" ]
}
93 changes: 28 additions & 65 deletions species/radien.raceeffect
Original file line number Diff line number Diff line change
@@ -1,76 +1,39 @@
{
"stats": [
{
"stat": "maxHealth",
"baseMultiplier": 0.90
},
{
"stat": "maxEnergy",
"baseMultiplier": 1.1
},

{
"stat": "foodDelta",
"baseMultiplier": 1.25
},
{
"stat": "radiationburnImmunity",
"amount": 1
},
{
"stat": "healingStatusImmunity",
"amount": 1
}
"stats" : [
{ "stat" : "maxHealth", "baseMultiplier" : 0.90 },
{ "stat" : "maxEnergy", "baseMultiplier" : 1.1 },
{ "stat" : "foodDelta", "baseMultiplier" : 1.25 },
{ "stat" : "radiationburnImmunity", "amount" : 1 },
{ "stat" : "healingStatusImmunity", "amount" : 1 }
],
"diet" : "entity",
"special": [ "radienFoodBoost" ],
"special" : [ "radienFoodBoost" ],

"envEffects": [{
"biomes": [
"hot"
],
"stats": [{
"stat": "protection",
"effectiveMultiplier": 0.85
},
{
"stat": "foodDelta",
"baseMultiplier": 1.35
}
"envEffects" : [
{
"biomes" : [ "hot" ],
"stats" : [
{ "stat" : "protection", "effectiveMultiplier" : 0.85 },
{ "stat" : "foodDelta", "baseMultiplier" : 1.35 }
]
},
{
"biomes": [
"toxic",
"alien",
"protoworld",
"irradiated",
"chromatic",
"protoworlddark",
"jungle",
"fungus",
"fungal"
],
"stats": [{
"stat": "powerMultiplier",
"baseMultiplier": 1.15
},
{
"stat": "energyRegenPercentageRate",
"baseMultiplier": 1.15
},
{
"stat": "foodDelta",
"baseMultiplier": 1.05
}
"biomes" : [ "toxic", "alien", "protoworld", "irradiated", "chromatic", "protoworlddark", "jungle", "fungus", "fungal" ],
"stats" : [
{ "stat" : "powerMultiplier", "baseMultiplier" : 1.15 },
{ "stat" : "energyRegenPercentageRate", "baseMultiplier" : 1.15 },
{ "stat" : "foodDelta", "baseMultiplier" : 1.05 }
]
}
],
"weaponEffects" : [
{
"weapons" : [ "radien" ],
"stats" : [
{ "stat" : "critChance", "amount" : 1.5 },
{ "stat" : "protection", "effectiveMultiplier" : 1.15 }
]
}
],
"weaponEffects": [{
"weapons": [ "radien" ],
"stats": [
{"stat": "critChance","amount": 1.5},
{"stat": "protection","effectiveMultiplier": 1.15}
]
}]
"tech" : [ "xi_bulb" ]
}
3 changes: 2 additions & 1 deletion species/saturn.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@
"effectiveMultiplier": 1.2
}]
}
]
],
"tech" : [ "flight_saturnian" ]
}
3 changes: 2 additions & 1 deletion species/saturn2.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
"weapons": ["scythe"],
"stats": [{"stat": "powerMultiplier","effectiveMultiplier": 1.12}]
}
]
],
"tech" : [ "flight_saturnianmoth" ]
}
3 changes: 2 additions & 1 deletion species/sergal.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@
}
]
}
]
],
"tech" : [ "huntersclaw" ]
}
3 changes: 2 additions & 1 deletion species/shadow.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@
"special": [
"shadowglow1",
"darkhunternightar"
]
],
"tech" : [ "tenebrhaeburst" ]
}
3 changes: 2 additions & 1 deletion species/thelusian.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,6 @@
"energyAmt": 0.25
}
}
]
],
"tech" : [ "bugarmor" ]
}
3 changes: 2 additions & 1 deletion species/veluu.raceeffect
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
]
}
],
"special" : [ "headlampveluu" ]
"special" : [ "headlampveluu" ],
"tech" : [ "veluuclaw" ]
}

0 comments on commit 3268e10

Please sign in to comment.