It is currently Fri Feb 24, 2017 3:20 am

Contact Us | All times are UTC - 6 hours [ DST ]



Welcome
Welcome to Tropico Modding

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!





 Page 1 of 1 [ 13 posts ] 
Author Message
 Post subject: Soil Quality Improvements
PostPosted: Fri Oct 10, 2014 3:03 pm 
Participant

Joined: Mon Oct 06, 2014 2:50 pm
Posts: 5
Has thanked: 0 time
Have thanks: 0 time
WARNING: Using a mod may void eligibility for customer support from the game publisher.



Plantation And Hydroponics Soil Quality 1.00
For Tropico 5



Plantations and Hydroponic Farms now have the ability to improve soil quality by 50 across the entire island.
Plantations have a Improved Irrigation upgrade in the World Wars Era that Improves the Effectiveness by 10 and Job Quality 10


    • You must create a new building or start a new game after installing this mod for it to take effect.
    • Contains a variable Improve Soil Amount to allow you to alter the soil quality upgrade to between 20 and 50.





    3. Unzip to your Tropico 5\Mods\ folder. Keep the directory structure!

This mod is based on one by LigerZero which can be found on the Kalypso Mod forums at Improved Soil Quality.

One improvement I made was to correctly set the Sickle research as required for a colonial era upgrade. This is not obvious but if you look at one of the Plantation files by unpacking the Data.hpk file and then decompiling a Plantation file (in Data\Building Templates) you will see the something like
Spoiler:
Example from this mod:

   table.insert(DIBT, PlaceObj("Upgrade", {
      "Research", "1.1. Farm Upgrades",
        "Id", "Soil Quality",
      "Name", T({"Fertilise Soil"}),
      "Rollover", T({"Increases Soil Quality for this type of crop across the island."}),
      "StartTurnedOn", false,
      "Cost", 1000,
      "StartingEra", 1
   }))

The mod is not in byte code format so you can easily view the code as an example which I hope with help other new modders


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Wed Nov 26, 2014 9:07 am 
Participant

Joined: Mon Sep 22, 2014 2:08 am
Posts: 7
Has thanked: 0 time
Have thanks: 0 time
This improvements are way too OP.


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sun Dec 21, 2014 6:23 pm 
Participant

Joined: Fri Nov 21, 2014 6:08 pm
Posts: 9
Has thanked: 2 time
Have thanks: 0 time
There is no zip file with this just a text file.lua.....

So where does it go? Mods Folder? or Configs folder?

Lise.


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sun Dec 21, 2014 6:26 pm 
Industrialist

Joined: Fri Oct 31, 2014 3:38 pm
Posts: 54
Location: France, just next to Switzerland :D
Has thanked: 0 time
Have thanks: 3 time
Waterborne: Yes
Espionage: No
Every mods goes to the mod folders, the config folders are only for, well, configs, which are optionnal.
So if there's only one file, it goes to the mods folder :)



_________________
/!\ Skyty's new account /!\
Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sun Dec 21, 2014 6:34 pm 
Participant

Joined: Fri Nov 21, 2014 6:08 pm
Posts: 9
Has thanked: 2 time
Have thanks: 0 time
Okay.

Thanks Kaenis


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Mon Aug 10, 2015 12:22 pm 
Loyalist

Joined: Fri Aug 22, 2014 9:15 pm
Posts: 21
Has thanked: 5 time
Have thanks: 0 time
Waterborne: Yes
Espionage: Yes
Any chance that the improvements could be localized to the plantation itself? Otherwise, this would serve better as an edict rather than an upgrade.


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sun Nov 15, 2015 8:12 pm 
Member

Joined: Mon Nov 09, 2015 8:40 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
Waterborne: Yes
Espionage: Yes
Thanks for this I love it!


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sun Apr 03, 2016 3:46 pm 
Participant

Joined: Fri Mar 25, 2016 4:20 pm
Posts: 58
Has thanked: 5 time
Have thanks: 0 time
Waterborne: Yes
Espionage: Yes
Hi

Thanks for sharing your mod :)

I have been trying to expand the same soil improving upgrade to ranches but without any luck.
I'm not sure if it is even possible but I wanted to try.
I have no knowledge at all when it come to writing lua, I just did what seem logical.

Here is what I added to the mod:
1. First I added another column with ranches after Hydroponics
Spoiler:
local Ranchs = {
   "RanchCattle",
   "RanchGoats",
   "RanchLlama",      
   "RanchPigs",
   "RanchChickens",
   "RanchElephants",
   "RanchAlligators"
}

2. Then I added this to the cropmarkers list
Spoiler:
   "CropCattleMarker",
   "CropGoatsMarker",
   "CropLlamaMarker",
   "CropPigsMarker",
   "CropChickensMarker",
   "CropElephantsMarker",
   "CropAlligatorsMarker"   

3.Then I added a new section for ranches at the bottom
Spoiler:
for i = 1, #Ranches do
    local HDIBT = DataInstances.BuildingTemplate[Ranches[i]]
   
   table.insert(HDIBT, PlaceObj("Upgrade", {
      "Id", "Soil Quality",
      "Name", T({"Fertilise Soil"}),
      "Rollover", T({"Increases Soil Quality for this type of crop across the island."}),
      "StartTurnedOn", false,
      "Cost", 4000,
      "StartingEra", 2
   }))
   table.insert(HDIBT,PlaceObj("CropOverlayMarkerComponent", {
        "EnabledBy","Soil Quality",
        "Grid", CrophMarkers[i],
        "Amount", mcfg.ImproveSoilAmount,
        "Radius",100000
   }))
     
end


Any suggestion to why did not work?


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Mon Apr 04, 2016 8:42 am 
Industrialist
User avatar

Joined: Thu Jan 07, 2016 11:53 pm
Posts: 54
Location: Halifax, UK
Has thanked: 6 time
Have thanks: 3 time
Waterborne: Yes
Espionage: Yes
xxx78 wrote:
Hi

Thanks for sharing your mod :)

I have been trying to expand the same soil improving upgrade to ranches but without any luck.
I'm not sure if it is even possible but I wanted to try.
I have no knowledge at all when it come to writing lua, I just did what seem logical.

Here is what I added to the mod:
1. First I added another column with ranches after Hydroponics
Spoiler:
local Ranchs = { <--- should say Ranches or Ranch
   "RanchCattle",
   "RanchGoats",
   "RanchLlama",      
   "RanchPigs",
   "RanchChickens",
   "RanchElephants",
   "RanchAlligators"
}

2. Then I added this to the cropmarkers list
Spoiler:
   "CropCattleMarker",
   "CropGoatsMarker",
   "CropLlamaMarker",
   "CropPigsMarker",
   "CropChickensMarker",
   "CropElephantsMarker",
   "CropAlligatorsMarker"   

3.Then I added a new section for ranches at the bottom
Spoiler:
for i = 1, #Ranches do
    local HDIBT = DataInstances.BuildingTemplate[Ranches[i]]
   
   table.insert(HDIBT, PlaceObj("Upgrade", {
      "Id", "Soil Quality",
      "Name", T({"Fertilise Soil"}),
      "Rollover", T({"Increases Soil Quality for this type of crop across the island."}),
      "StartTurnedOn", false,
      "Cost", 4000,
      "StartingEra", 2
   }))
   table.insert(HDIBT,PlaceObj("CropOverlayMarkerComponent", {
        "EnabledBy","Soil Quality",
        "Grid", CrophMarkers[i], <-- Remove the h
        "Amount", mcfg.ImproveSoilAmount,
        "Radius",100000
   }))
     
end


Any suggestion to why did not work?


This mod only adds upgrades to plantations and hydroponics. Crops use Soil Quality whereas ranches use Pasture Quality, they arent the same so attempting to change this mod to include them wont work. AFAIK there isnt any mod that will improve pasture quality for ranches.

Also there are a few errors in the file, I have marked a few of them. In spoiler 2 pigs, goats etc are not crops so unless im wrong (which is quite possible) they wouldnt use crop markers.

Its good to see you trying to improve this mod and i will be happy to help where and when i can, If you manage to get it working beforehand please share as i wouldnt mind using it myself


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Tue Apr 05, 2016 2:59 am 
Participant

Joined: Fri Mar 25, 2016 4:20 pm
Posts: 58
Has thanked: 5 time
Have thanks: 0 time
Waterborne: Yes
Espionage: Yes
pheonixx wrote:
xxx78 wrote:
Hi

Thanks for sharing your mod :)

I have been trying to expand the same soil improving upgrade to ranches but without any luck.
I'm not sure if it is even possible but I wanted to try.
I have no knowledge at all when it come to writing lua, I just did what seem logical.

Here is what I added to the mod:
1. First I added another column with ranches after Hydroponics
Spoiler:
local Ranchs = { <--- should say Ranches or Ranch
   "RanchCattle",
   "RanchGoats",
   "RanchLlama",      
   "RanchPigs",
   "RanchChickens",
   "RanchElephants",
   "RanchAlligators"
}

2. Then I added this to the cropmarkers list
Spoiler:
   "CropCattleMarker",
   "CropGoatsMarker",
   "CropLlamaMarker",
   "CropPigsMarker",
   "CropChickensMarker",
   "CropElephantsMarker",
   "CropAlligatorsMarker"   

3.Then I added a new section for ranches at the bottom
Spoiler:
for i = 1, #Ranches do
    local HDIBT = DataInstances.BuildingTemplate[Ranches[i]]
   
   table.insert(HDIBT, PlaceObj("Upgrade", {
      "Id", "Soil Quality",
      "Name", T({"Fertilise Soil"}),
      "Rollover", T({"Increases Soil Quality for this type of crop across the island."}),
      "StartTurnedOn", false,
      "Cost", 4000,
      "StartingEra", 2
   }))
   table.insert(HDIBT,PlaceObj("CropOverlayMarkerComponent", {
        "EnabledBy","Soil Quality",
        "Grid", CrophMarkers[i], <-- Remove the h
        "Amount", mcfg.ImproveSoilAmount,
        "Radius",100000
   }))
     
end


Any suggestion to why did not work?


This mod only adds upgrades to plantations and hydroponics. Crops use Soil Quality whereas ranches use Pasture Quality, they arent the same so attempting to change this mod to include them wont work. AFAIK there isnt any mod that will improve pasture quality for ranches.

Also there are a few errors in the file, I have marked a few of them. In spoiler 2 pigs, goats etc are not crops so unless im wrong (which is quite possible) they wouldnt use crop markers.

Its good to see you trying to improve this mod and i will be happy to help where and when i can, If you manage to get it working beforehand please share as i wouldnt mind using it myself


Ok I see, I did not know about pasture quality, cropmarkes was just a guess, I dont even know what it is.
I will see what I can do, I dont expect much :)


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sat Apr 09, 2016 10:39 am 
Site Admin
User avatar

Joined: Sat Jun 28, 2014 8:59 pm
Posts: 322
Location: Wisconsin
Has thanked: 1 time
Have thanks: 82 time
Waterborne: Yes
Espionage: Yes
I have created an addon mod for PapiGamer's Edicts mod that includes ranches with the Compost Tropico edict.



You can see how ranch grids are handled by taking a look at the lua file or you can just install it and get what you are looking for.


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Mon Apr 11, 2016 2:55 pm 
Participant

Joined: Fri Mar 25, 2016 4:20 pm
Posts: 58
Has thanked: 5 time
Have thanks: 0 time
Waterborne: Yes
Espionage: Yes
DarthPresidente wrote:
I have created an addon mod for PapiGamer's Edicts mod that includes ranches with the Compost Tropico edict.



You can see how ranch grids are handled by taking a look at the lua file or you can just install it and get what you are looking for.

That's just fantastic :D
Thanks for sharing your mods.


Offline
 Profile  
 
 Post subject: Re: Soil Quality Improvements
PostPosted: Sat Nov 26, 2016 7:23 am 
Member

Joined: Sat Nov 26, 2016 6:58 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Waterborne: Yes
Espionage: Yes
Recently I decided to return to Tropico 5 and, surprisingly, this mod stopped working properly. Now it works strangely: Job Quality from the upgrade indeed increases, but Effectiveness doesn't.
Original link to the mod is also obsolete, so I can't just download it in a state it was (I have made some small changes, namely, deleted the code for island-encompassing upgrade). Can someone help me with this? Maybe it's incompatible with new ModLoader version?
Log file shows no problems in loading the mod and other mods I use shouldn't interfere (list is below).
Spoiler:
Amendment Fix
Bigger Boats
Big Huge Deposits
Forced Labor
Kaenis Raw Resource Upgrades
Logging Tweak
More Power
No Ranch Decay
Refinery Fix
Smart Auto Destroy


Here's how the code looks right now:
-- Improved Soil Quality
-- By DavDarkelf
-- Based on Mod by LigerZero

local MyMod = {
   Name = "Improved Soil Quality", NameText = "SoilQuality",
   Author = "DavDarkelf", Version = "1.0",
   VersionN = 211,
   Config = {
      ImproveSoilAmount = {
         Type = "number",
         Default = 50,
         RangeMin = 20,
         RangeMax = 50
      }
   }
}
local loadfail, mdata, mcfg, ModT = ModRegister(MyMod)
if loadfail then
   DebugPrint(loadfail .. "\n")
   return
end


OnMsg.DataLoaded = function()
local Plantations = {
   "PlantationBanana",
   "PlantationCocoa",
   "PlantationCoffee",
   "PlantationCorn",
   "PlantationCotton",
   "PlantationPineapple",
   "PlantationSugarCane",
   "PlantationTobacco"
}

local Hydroponics = {
    "HydroponicsFarmBanana",
    "HydroponicsFarmCocoa",
    "HydroponicsFarmCoffee",
    "HydroponicsFarmCorn",
    "HydroponicsFarmCotton",
    "HydroponicsFarmPineapple",
    "HydroponicsFarmSugarCane",
    "HydroponicsFarmTobacco"
}

local CropMarkers = {
   "CropBananaMarker",
   "CropCocoaMarker",
   "CropCoffeeMarker",
   "CropCornMarker",
   "CropCottonMarker",
   "CropPineappleMarker",
   "CropSugarMarker",
   "CropTobaccoMarker"
}



for i = 1, #Plantations do
local DIBT = DataInstances.BuildingTemplate[Plantations[i]]

   table.insert(DIBT, PlaceObj("Upgrade", {
        "Id", "Improved Irrigation",
      "Name", T({"Improved Irrigation"}),
      "Rollover", T({"Improved Irrigation improves effectiveness by 20 and job quality by 10."}),
      "StartTurnedOn", false,
      "Cost", 2000,
      "StartingEra",2
   }))
    table.insert(DIBT,PlaceObj("ApplyModifier", {
        "EnabledBy", "Improved Irrigation",
        "PropName", " InherentEffectiveness",
        "Value", 20
   }))
    table.insert(DIBT,PlaceObj("ApplyModifier", {
        "EnabledBy", "Improved Irrigation",
        "Category", "Workplace",
        "PropName", "InherentJobQuality",
        "Value", 10
   }))   
       
end

for i = 1, #Hydroponics do
local DIBT = DataInstances.BuildingTemplate[Hydroponics[i]]

   table.insert(DIBT, PlaceObj("Upgrade", {
        "Id", "Improved Irrigation",
      "Name", T({"Improved Irrigation"}),
      "Rollover", T({"Improved Irrigation improves effectiveness by 20 and job quality by 10."}),
      "StartTurnedOn", false,
      "Cost", 2000,
      "StartingEra",3
   }))
    table.insert(DIBT,PlaceObj("ApplyModifier", {
        "EnabledBy", "Improved Irrigation",
        "PropName", " InherentEffectiveness",
        "Value", 20
   }))
    table.insert(DIBT,PlaceObj("ApplyModifier", {
        "EnabledBy", "Improved Irrigation",
        "Category", "Workplace",
        "PropName", "InherentJobQuality",
        "Value", 10
   }))   
       
end

end



Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 13 posts ] 

Contact Us | All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


suspicion-preferred