Skip to content

Commit

Permalink
getting closer
Browse files Browse the repository at this point in the history
  • Loading branch information
nikothedude committed Jun 23, 2024
1 parent 133d28a commit 895aace
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 14 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions More Planetary Conditions.iml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
<orderEntry type="library" name="ExerelinCore" level="project" />
<orderEntry type="library" name="MagicLib-Kotlin" level="project" />
<orderEntry type="library" name="HMI" level="project" />
<orderEntry type="library" name="Industrial.Evolution3.3" level="project" />
</component>
</module>
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
3.3.3:
SAVE COMPATIBLE

Fixed a bug where XIV legions would spawn with custom smods (fuck)
If XIV legions are still spawning with this variant after updating, try running niko_MPC_genericCommand
You can test this by running AddShip legion_xiv_Elite and investigating the ship the game adds to your fleet

Reduced spawnrate of FTC districts, spy arrays, meson fields and hypermagnetic fields

3.3.2:
SAVE COMPATABLE

Expand Down
6 changes: 3 additions & 3 deletions data/campaign/procgen/condition_gen_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ niko_MPC_antiAsteroidSatellites_derelict,niko_MPC_satellites,5,25,,FALSE,48,,,,1
niko_MPC_overgrownNanoforge_no_pick,niko_MPC_overgrownNanoforge,5,30,,,,,,,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,,,,,,,,,,,,,,,,,,,
niko_MPC_overgrownNanoforgeCondition,niko_MPC_overgrownNanoforge,5,30,,TRUE,90,,,,5,8,8,8,8,8,8,5,10,10,10,10,10,10,10,10,10,10,10,10,10,,0.9,0.5,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
niko_MPC_ultraMagneticField_no_pick,niko_MPC_ultraMagneticField,5,35,,,,,,,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,,,,,,,,,,,,,,,,,,,
niko_MPC_ultraMagneticField_no_pick,niko_MPC_ultraMagneticField,5,35,,,,,,,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,,,,,,,,,,,,,,,,,,,
niko_MPC_ultraMagneticField,niko_MPC_ultraMagneticField,5,35,,FALSE,40,,,,20,16,10,9,9,30,30,9,9,9,9,9,13,13,13,13,13,13,13,13,13,,,,0.5,3,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
niko_MPC_hyperspaceBipartisan_no_pick,niko_MPC_hyperspaceBipartisan,5,40,,,,,,,10000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,,,,,,,,,,,,,,,,,,,
niko_MPC_hyperspaceBipartisan,niko_MPC_hyperspaceBipartisan,5,40,,FALSE,78,,,habitable,0,7,7,7,20,10,10,7,7,7,7,7,20,20,20,20,20,20,20,20,20,,,,0.5,3,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
niko_MPC_ftcDistricts_no_pick,niko_MPC_ftcDistricts,4,40,,,,,,,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,,,,,,,,,,,,,,,,,,,
niko_MPC_ftcDistricts_no_pick,niko_MPC_ftcDistricts,4,40,,,,,,,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,,,,,,,,,,,,,,,,,,,
niko_MPC_ftcDistricts,niko_MPC_ftcDistricts,4,40,,TRUE,24,,,,40,40,40,40,60,100,40,40,40,40,40,40,100,100,100,100,100,100,100,100,100,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
niko_MPC_spyArrays_no_pick,niko_MPC_spyArrays,4,40,,,,,,,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,,,,,,,,,,,,,,,,,,,
niko_MPC_spyArrays_no_pick,niko_MPC_spyArrays,4,40,,,,,,,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,1250,,,,,,,,,,,,,,,,,,,
niko_MPC_spyArrays,niko_MPC_spyArrays,4,40,,TRUE,24,,,,40,40,40,40,60,100,40,40,40,40,40,40,100,100,100,100,100,100,100,100,100,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
niko_MPC_carnivorousFauna_no_pick,niko_MPC_carnivorousFauna,4,60,,TRUE,24,,,,600,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,,,,,,,,,,,,,,,,,,,
Expand Down
4 changes: 2 additions & 2 deletions data/campaign/procgen/planet_gen_data.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id,type,category,frequency,habOffsetMin,habOffsetMax,habOffsetYOUNG,habOffsetAVERAGE,habOffsetOLD,tags,probOrbits,minOrbits,maxOrbits,minRadius,maxRadius,minColor,maxColor,YOUNG,AVERAGE,OLD,star_orange_giant,star_red_giant,star_red_supergiant,star_red_dwarf,star_orange,star_yellow,star_browndwarf,star_white,star_blue_giant,star_blue_supergiant,star_neutron,black_hole,binary,trinary,cat_giant,cat_frozen,cat_cryovolcanic,cat_hab1,cat_hab2,cat_hab3,cat_hab4,cat_hab5,cat_barren,cat_toxic,lagrange,in_asteroids,is_moon
,CATEGORY,MPC_cat_mesonfield,20,,,,,,,,,,,,,,0.75,,1.5,,,,,,,,1.5,,,3,2,,,1,,,,2,2,2,2,,,0,0,
MPC_mesonField,TERRAIN,MPC_cat_mesonfield,10,,,,,,"first_orbit_only, not_NEBULA_unless_moon",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6,6,,,
,CATEGORY,MPC_cat_mesonfield,14,,,,,,,,,,,,,,0.75,,1.5,,,,,,,,1.5,,,3,2,,,1,0.2,0.2,2,2,2,2,2,,,0,0,
MPC_mesonField,TERRAIN,MPC_cat_mesonfield,10,,,,,,"first_orbit_only, not_NEBULA_unless_moon",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,3,,,
Binary file modified jars/niko_morePlanetaryConditions.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion mod_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name":"More Planetary Conditions", # Displayed to the player
"author":"Niko",
"utility":"false",
"version":"3.3.2",
"version":"3.3.3",
"description":"Adds a bunch of misc. planetary conditions to the game, many, if not most, with custom scripted effects that go beyond what most other conditions, vanilla or modded, do.",
"gameVersion": "0.97a-RC11",
"jars":["jars/niko_morePlanetaryConditions.jar"],
Expand Down
2 changes: 1 addition & 1 deletion niko_MPC.version
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
{
"major":3,
"minor":3,
"patch":2 # Can be a number, character or string (1, 2, a, b, "-RC2", etc)
"patch":3 # Can be a number, character or string (1, 2, a, b, "-RC2", etc)
},
}
70 changes: 69 additions & 1 deletion src/data/console/commands/niko_MPC_genericCommand.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
package data.console.commands

import com.fs.starfarer.api.Global
import com.fs.starfarer.api.campaign.PlanetAPI
import com.fs.starfarer.api.campaign.SpecialItemData
import com.fs.starfarer.api.impl.campaign.ids.*
import com.fs.starfarer.api.impl.campaign.ids.Tags.VARIANT_ALWAYS_RECOVERABLE
import com.fs.starfarer.api.impl.campaign.intel.deciv.DecivTracker
import com.fs.starfarer.api.impl.campaign.rulecmd.Nex_HasBackground
import exerelin.campaign.SectorManager.transferMarket
import exerelin.campaign.intel.colony.ColonyExpeditionIntel.createColonyStatic
import exerelin.campaign.intel.groundbattle.GBUtils
import exerelin.campaign.intel.groundbattle.GroundBattleIntel
import exerelin.campaign.intel.groundbattle.GroundUnit
import exerelin.campaign.intel.groundbattle.GroundUnitDef
import indevo.industries.artillery.utils.ArtilleryStationPlacer.addArtilleryToPlanet
import lunalib.lunaExtensions.getMarketsCopy
import org.lazywizard.console.BaseCommand
import org.lazywizard.console.Console
import org.magiclib.kotlin.hasFarmland

class niko_MPC_genericCommand: BaseCommand {
override fun runCommand(args: String, context: BaseCommand.CommandContext): BaseCommand.CommandResult {
Expand Down Expand Up @@ -55,7 +66,64 @@ class niko_MPC_genericCommand: BaseCommand {
}*/
//createBattle()

Console.showMessage("success")
/*val fortExtradol = Global.getSector().getEntityById("exsedol_station") ?: return BaseCommand.CommandResult.ERROR
val armaaFac = fortExtradol.faction
fortExtradol.market.getIndustry(Industries.HIGHCOMMAND).isImproved = true
fortExtradol.market.getIndustry(Industries.HIGHCOMMAND).aiCoreId = Commodities.ALPHA_CORE
fortExtradol.market.getIndustry(Industries.HEAVYBATTERIES).isImproved = true
fortExtradol.market.getIndustry(Industries.HEAVYBATTERIES).aiCoreId = Commodities.ALPHA_CORE
fortExtradol.market.getIndustry(Industries.HEAVYBATTERIES).specialItem = SpecialItemData(Items.DRONE_REPLICATOR, null)
fortExtradol.market.getIndustry(Industries.HEAVYINDUSTRY).isImproved = true
fortExtradol.market.removeIndustry(Industries.SPACEPORT, null, false)
fortExtradol.market.addIndustry(Industries.MEGAPORT)
fortExtradol.market.getIndustry(Industries.STARFORTRESS_MID).aiCoreId = Commodities.ALPHA_CORE
val jenius = Global.getSector().getEntityById("nekki1") as? PlanetAPI ?: return BaseCommand.CommandResult.ERROR
createColonyStatic(jenius.market, jenius, armaaFac, false, false)
jenius.market.size = 4
if (jenius.market.hasFarmland()) {
jenius.market.addIndustry(Industries.FARMING)
jenius.market.getIndustry(Industries.FARMING).isImproved = true
} else {
jenius.market.addIndustry(Industries.REFINING)
jenius.market.getIndustry(Industries.REFINING).isImproved = true
}
jenius.market.removeCondition(Conditions.HIGH_GRAVITY)
jenius.market.addIndustry(Industries.MINING)
jenius.market.getIndustry(Industries.MINING).specialItem = SpecialItemData(Items.MANTLE_BORE, null)
jenius.market.addIndustry(Industries.PATROLHQ)
jenius.market.addIndustry(Industries.GROUNDDEFENSES)
jenius.market.addIndustry(Industries.WAYSTATION)
jenius.market.removeIndustry(Industries.SPACEPORT, null, false)
jenius.market.addIndustry(Industries.MEGAPORT)
jenius.market.addIndustry(Industries.ORBITALSTATION_HIGH)
addArtilleryToPlanet(jenius, false)
jenius.market.addIndustry("IndEvo_Artillery_railgun")
jenius.market.getIndustry("IndEvo_Artillery_railgun").aiCoreId = Commodities.BETA_CORE
val siphonPlat = Global.getSector().getEntityById("salus_siphon_plat") ?: return BaseCommand.CommandResult.ERROR
DecivTracker.decivilize(siphonPlat.market, true)*/

/*val markets = Global.getSector().getFaction("dassault_mikoyan")?.getMarketsCopy()
if (markets != null) {
for (market in markets) {
DecivTracker.decivilize(market, true)
}
}*/

/*Global.getSector().getEntityById("PSE_newCaledonia").market.factionId = Factions.DIKTAT
transferMarket(Global.getSector().getEntityById("PSE_newCaledonia").market, Global.getSector().getFaction("pearson_exotronics"), Global.getSector().getFaction(Factions.DIKTAT), false, false, null, 0f, true)
Console.showMessage("success")*/

val variant = Global.getSettings().getVariant("legion_xiv_Elite")
variant.removePermaMod(HullMods.SOLAR_SHIELDING)
variant.removePermaMod(HullMods.HEAVYARMOR)
variant.removePermaMod("niko_MPC_fighterSolarShielding")
variant.tags -= VARIANT_ALWAYS_RECOVERABLE

return BaseCommand.CommandResult.SUCCESS
}

Expand Down
6 changes: 3 additions & 3 deletions src/data/utilities/niko_MPC_miscUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ object niko_MPC_miscUtils {
if (flagship.shipName == niko_MPC_ids.SKULIODA_SHIP_NAME) {
val newVariant: ShipVariantAPI
if (niko_MPC_settings.MCTE_loaded && MCTE_settings.PULSAR_EFFECT_ENABLED) {
newVariant = Global.getSettings().getVariant("legion_xiv_skulioda")
newVariant = Global.getSettings().getVariant("legion_xiv_skulioda").clone()
flagship.captain?.setPersonality(Personalities.RECKLESS)
} else {
newVariant = Global.getSettings().getVariant("legion_xiv_Elite")
newVariant = Global.getSettings().getVariant("legion_xiv_Elite").clone()
flagship.captain?.setPersonality(Personalities.AGGRESSIVE)
}
// probably safe, i mean, when the hell will the corona resist fleet get another skuliodas prize
flagship.setVariant(newVariant, false, false)
flagship.setVariant(newVariant, true, false)

flagship.variant.addPermaMod(HullMods.SOLAR_SHIELDING, true)
flagship.variant.addPermaMod(HullMods.HEAVYARMOR, true)
Expand Down

0 comments on commit 895aace

Please sign in to comment.