mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-28 21:58:54 +07:00
Incan mod is successful! We can haz mods! =D
This commit is contained in:
@ -81,7 +81,6 @@
|
||||
obsoleteTech:"Metal Casting",
|
||||
upgradesTo:"Swordsman",
|
||||
attackSound:"nonmetalhit"
|
||||
//Barbarian unique unit
|
||||
},
|
||||
{
|
||||
name:"Archer",
|
||||
@ -92,8 +91,8 @@
|
||||
cost: 40,
|
||||
hurryCostModifier:20,
|
||||
requiredTech:"Archery",
|
||||
obsoleteTech:"Machinery",//Should be Construction
|
||||
upgradesTo:"Crossbowman",//Should be Composite Bowman
|
||||
obsoleteTech:"Machinery",
|
||||
upgradesTo:"Crossbowman"
|
||||
attackSound:"arrow"
|
||||
},
|
||||
{
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
android/assets/mods/ExampleIncaMod/Images/NationIcons/Inca.png
Normal file
BIN
android/assets/mods/ExampleIncaMod/Images/NationIcons/Inca.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
android/assets/mods/ExampleIncaMod/Images/UnitIcons/Slinger.png
Normal file
BIN
android/assets/mods/ExampleIncaMod/Images/UnitIcons/Slinger.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
27
android/assets/mods/ExampleIncaMod/game.atlas
Normal file
27
android/assets/mods/ExampleIncaMod/game.atlas
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
game.png
|
||||
size: 512,128
|
||||
format: RGBA8888
|
||||
filter: MipMapLinearLinear,MipMapLinearLinear
|
||||
repeat: none
|
||||
ImprovementIcons/Terrace farm
|
||||
rotate: false
|
||||
xy: 206, 2
|
||||
size: 100, 100
|
||||
orig: 100, 100
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
NationIcons/Inca
|
||||
rotate: false
|
||||
xy: 2, 2
|
||||
size: 100, 100
|
||||
orig: 100, 100
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
UnitIcons/Slinger
|
||||
rotate: false
|
||||
xy: 104, 2
|
||||
size: 100, 100
|
||||
orig: 100, 100
|
||||
offset: 0, 0
|
||||
index: -1
|
BIN
android/assets/mods/ExampleIncaMod/game.png
Normal file
BIN
android/assets/mods/ExampleIncaMod/game.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
@ -0,0 +1,41 @@
|
||||
[
|
||||
|
||||
{
|
||||
name:"Inca",
|
||||
leaderName:"Pachacuti",
|
||||
adjective:["Incan"],
|
||||
startBias:["Hill"],
|
||||
preferredVictoryType:"Cultural",
|
||||
|
||||
startIntroPart1: "Oh ye who remakes the world, your loyal subjects greet you, King Pachacuti Sapa Inca, ruler of the Inca people! From the beginnings in the small state of Cusco, the Incans displayed their potential for greatness, marching to war against their many enemies, crushing their armies into dust and carving for themselves a mighty empire stretching from Ecuador to Chile. Indeed, they build the greatest empire ever seen in all pre-Columbian Americas. More than mere soldiers, your people were great builders and artists as well, and the remnants of their works still awe and inspire the world today."
|
||||
startIntroPart2: "Oh King Pachacuti, truly are you called 'Earth Shaker'! Will you once again call upon the ground itself to a fight at your side? Your armies await your signal. Will you restore the glory of your empire? Can you build a civilization that will stand the test of time?"
|
||||
|
||||
declaringWar:"Resistance is futile! You cannot hope to stand against the mighty Incan empire. If you will not surrender immediately, then prepare for war!"
|
||||
attacked:"Declare war on me?!? You can't, because I declare war on you first!"
|
||||
defeated:"How did you darken the sun? I ruled with diligence and mercy—see that you do so as well."
|
||||
introduction:"How are you? You stand before Pachacuti Inca Yupanqui."
|
||||
|
||||
neutralHello:"How are you doing?"
|
||||
neutralLetsHearIt:["Go on.","What do you say?","You may begin."]
|
||||
neutralNo:["We absolutely refuse.","No!","I refuse."]
|
||||
neutralYes:["Very good.","Of course, yes","That is very good."]
|
||||
|
||||
hateHello:"What do you want now?"
|
||||
hateLetsHearIt:["Speak!","What do you say?","Go on."]
|
||||
hateNo:["That is not possible!","We are not agreeing to that!","I beg your pardon?"]
|
||||
hateYes:["That is fine.","That is good enough.","Very well..."]
|
||||
|
||||
afterPeace:"Viracocha has frowned upon our war, and has agreed to our peace agreements."
|
||||
tradeRequest:"The Incan people offer this fair trade."
|
||||
|
||||
outerColor:[255,255,51],
|
||||
innerColor:[0,204,102],
|
||||
uniqueName:"Great Andean Road"
|
||||
unique:"",
|
||||
//unique:"Units ignore terrain costs when moving into any tile with Hills. No maintenance costs for improvements in Hills; half cost elsewhere.",
|
||||
cities:["Cuzco","Tiwanaku","Machu","Ollantaytambo","Corihuayrachina","Huamanga","Vilcas","Vilcabamba","Vitcos",
|
||||
"Andahuaylas","Ica","Arequipa","Nasca","Atico","Juli","Chuito","Chuquiapo","Huanuco Pampa","Tamboccocha",
|
||||
"Huaras","Riobamba","Caxamalca","Sausa","Tambo Colorado","Huaca","Tumbes","Chan Chan","Sipan","Pachacamac",
|
||||
"Llactapata","Pisac","Kuelap","Pajaten","Chucuito","Choquequirao"]
|
||||
}
|
||||
]
|
@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
name:"Terrace farm",
|
||||
uniqueTo:"Inca",
|
||||
food:2,
|
||||
turnsToBuild:4,
|
||||
improvingTech:"Construction",
|
||||
improvingTechStats:{food:1}
|
||||
terrainsCanBeBuiltOn:["Hills"],
|
||||
},
|
||||
]
|
16
android/assets/mods/ExampleIncaMod/jsons/Units.json
Normal file
16
android/assets/mods/ExampleIncaMod/jsons/Units.json
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
name:"Slinger",
|
||||
unitType:"Melee",
|
||||
uniqueTo:"Inca",
|
||||
replaces:"Archer",
|
||||
movement:2,
|
||||
strength:4,
|
||||
rangedStrength:7,
|
||||
requiredTech:"Archery",
|
||||
obsoleteTech:"Machinery",
|
||||
upgradesTo:"Crossbowman",
|
||||
uniques:["Can move after attacking"],
|
||||
attackSound:"arrow",
|
||||
},
|
||||
]
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
@ -1,13 +0,0 @@
|
||||
|
||||
game.png
|
||||
size: 128,128
|
||||
format: RGBA8888
|
||||
filter: MipMapLinearLinear,MipMapLinearLinear
|
||||
repeat: none
|
||||
UnitIcons/Maori Warrior
|
||||
rotate: false
|
||||
xy: 2, 2
|
||||
size: 100, 100
|
||||
orig: 100, 100
|
||||
offset: 0, 0
|
||||
index: -1
|
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB |
@ -1,16 +0,0 @@
|
||||
[
|
||||
{
|
||||
name:"Maori Warrior",
|
||||
unitType:"Melee",
|
||||
uniqueTo:"Polynesia",
|
||||
replaces:"Warrior",
|
||||
movement:2,
|
||||
strength:80,
|
||||
cost: 40,
|
||||
hurryCostModifier:20,
|
||||
obsoleteTech:"Metal Casting",
|
||||
promotions:["Haka War Dance"],
|
||||
upgradesTo:"Swordsman",
|
||||
attackSound:"nonmetalhit"
|
||||
},
|
||||
]
|
@ -25,7 +25,7 @@ class NewGameScreen: PickerScreen(){
|
||||
|
||||
val newGameParameters= UncivGame.Current.gameInfo.gameParameters
|
||||
val mapParameters = UncivGame.Current.gameInfo.tileMap.mapParameters
|
||||
val ruleSet = RulesetCache.getComplexRuleset(newGameParameters.mods)
|
||||
val ruleset = RulesetCache.getComplexRuleset(newGameParameters.mods)
|
||||
|
||||
init {
|
||||
setDefaultCloseAction()
|
||||
|
@ -13,13 +13,14 @@ import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.ruleset.tech.TechEra
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.toLabel
|
||||
|
||||
class NewGameScreenOptionsTable(val newGameScreen: NewGameScreen, val updatePlayerPickerTable:()->Unit)
|
||||
: Table(CameraStageBaseScreen.skin) {
|
||||
val newGameParameters = newGameScreen.newGameParameters
|
||||
val mapParameters = newGameScreen.mapParameters
|
||||
val ruleset = newGameScreen.ruleSet
|
||||
val ruleset = newGameScreen.ruleset
|
||||
|
||||
init {
|
||||
pad(10f)
|
||||
@ -225,6 +226,10 @@ class NewGameScreenOptionsTable(val newGameScreen: NewGameScreen, val updatePlay
|
||||
fun reloadMods(){
|
||||
ruleset.clear()
|
||||
ruleset.add(RulesetCache.getComplexRuleset(newGameParameters.mods))
|
||||
ruleset.mods+=newGameParameters.mods
|
||||
|
||||
ImageGetter.ruleset=ruleset
|
||||
ImageGetter.setTextureRegionDrawables()
|
||||
}
|
||||
|
||||
add("{Mods}:".tr()).colspan(2).row()
|
||||
|
@ -30,9 +30,12 @@ class PlayerPickerTable(val newGameScreen: NewGameScreen, val newGameParameters:
|
||||
|
||||
fun update() {
|
||||
playerListTable.clear()
|
||||
val gameBasics = newGameScreen.ruleSet // when we add mods, this will need to change
|
||||
for (player in newGameParameters.players)
|
||||
playerListTable.add(getPlayerTable(player,gameBasics)).pad(10f).row()
|
||||
val gameBasics = newGameScreen.ruleset // the mod picking changes this ruleset
|
||||
for (player in newGameParameters.players) {
|
||||
if(!newGameScreen.ruleset.nations.containsKey(player.chosenCiv)) // this was in a mod we disabled
|
||||
player.chosenCiv="Random"
|
||||
playerListTable.add(getPlayerTable(player, gameBasics)).pad(10f).row()
|
||||
}
|
||||
if(newGameParameters.players.count() < gameBasics.nations.values.count { it.isMajorCiv() }) {
|
||||
playerListTable.add("+".toLabel(Color.BLACK,30).apply { this.setAlignment(Align.center) }
|
||||
.surroundWithCircle(50f).onClick { newGameParameters.players.add(Player()); update() })
|
||||
@ -108,7 +111,7 @@ class PlayerPickerTable(val newGameScreen: NewGameScreen, val newGameParameters:
|
||||
val nationImage = if (player.chosenCiv == "Random") "?".toLabel(Color.BLACK,30)
|
||||
.apply { this.setAlignment(Align.center) }
|
||||
.surroundWithCircle(50f)
|
||||
else ImageGetter.getNationIndicator(newGameScreen.ruleSet.nations[player.chosenCiv]!!, 50f)
|
||||
else ImageGetter.getNationIndicator(newGameScreen.ruleset.nations[player.chosenCiv]!!, 50f)
|
||||
nationTable.add(nationImage)
|
||||
nationTable.add(player.chosenCiv.toLabel()).pad(20f)
|
||||
nationTable.touchable = Touchable.enabled
|
||||
@ -138,11 +141,11 @@ class PlayerPickerTable(val newGameScreen: NewGameScreen, val newGameParameters:
|
||||
nationListTable.add(randomPlayerTable).pad(10f).width(nationsPopupWidth).row()
|
||||
|
||||
|
||||
for (nation in newGameScreen.ruleSet.nations.values.filter { !it.isCityState() && it.name != "Barbarians" }) {
|
||||
for (nation in newGameScreen.ruleset.nations.values.filter { !it.isCityState() && it.name != "Barbarians" }) {
|
||||
if (player.chosenCiv != nation.name && newGameParameters.players.any { it.chosenCiv == nation.name })
|
||||
continue
|
||||
|
||||
nationListTable.add(NationTable(nation, nationsPopupWidth,newGameScreen.ruleSet).onClick {
|
||||
nationListTable.add(NationTable(nation, nationsPopupWidth,newGameScreen.ruleset).onClick {
|
||||
player.chosenCiv = nation.name
|
||||
nationsPopup.close()
|
||||
update()
|
||||
|
Reference in New Issue
Block a user