Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Never-ending resource??
Author Message
chenjywz Offline
Newbie
*

Posts: 6
Joined: Apr 2012
Post: #1
Question Never-ending resource??
Is is possible to make gold mine to became a never-ending resource such like salt mine? If the answer is yes, then does anyone know how to do it?
22-04-2012 11:13 AM
Find all posts by this user Quote this message in a reply
aresius Offline
Junior Member
**

Posts: 20
Joined: Jan 2012
Post: #2
RE: Never-ending resource??
(22-04-2012 11:13 AM)chenjywz Wrote:  Is is possible to make gold mine to became a never-ending resource such like salt mine? If the answer is yes, then does anyone know how to do it?
no, if you have modern times you can use the new bore-mine, if you dont have it when you finish the raw resources you can import
22-04-2012 01:30 PM
Find all posts by this user Quote this message in a reply
chenjywz Offline
Newbie
*

Posts: 6
Joined: Apr 2012
Post: #3
RE: Never-ending resource??
(22-04-2012 01:30 PM)aresius Wrote:  
(22-04-2012 11:13 AM)chenjywz Wrote:  Is is possible to make gold mine to became a never-ending resource such like salt mine? If the answer is yes, then does anyone know how to do it?
no, if you have modern times you can use the new bore-mine, if you dont have it when you finish the raw resources you can import

to say the least, as the default resource count are 12,000 and 7,980, then can we increase them?
22-04-2012 01:51 PM
Find all posts by this user Quote this message in a reply
AgentOrange330 Offline
Member
***

Posts: 69
Joined: Feb 2010
Post: #4
RE: Never-ending resource??
I play Tropcio on the Xbox so I'd say there is no way to increase them. On the PC I'm sure there might be a mod or something that you could do to increase the resource amount but short of that there is no in game way to increase the amount of resources. As aresius said, if you're looking at these resources for industry you can import them in order to keep your industry running.
22-04-2012 09:07 PM
Find all posts by this user Quote this message in a reply
Swixel Offline
Epic Member
*******

Posts: 1,087
Joined: Sep 2011
Post: #5
RE: Never-ending resource??
If memory serves, they're stored in the map data, which is a ZLIB format nobody has bothered with from what I remember. (Ford's crashes, and I've never had any luck with zlib, so ends the HPK extractors I know of Tongue)

To mod it you'd be looking at tweaking a function.

As for modding the XBox, I'd need to talk to someone with an XBox version again, but I think there's a way to get around various issues on the unmodded, non-sdk, builds.

"I am not ashamed to confess I am ignorant of what I do not know" ― Cicero.

"You had to hand it to the Patrician, he admitted grudgingly. If you didn't, he sent men to come and take it away." ― Terry Pratchett (Guards! Guards!)
22-04-2012 10:56 PM
Find all posts by this user Quote this message in a reply
ivory_malinov Offline
Member
***

Posts: 75
Joined: Sep 2011
Post: #6
RE: Never-ending resource??
My borehole mines still deplete a resource then sit there doing nothing. I thought they tapped a never ending supply?
22-04-2012 11:45 PM
Find all posts by this user Quote this message in a reply
chenjywz Offline
Newbie
*

Posts: 6
Joined: Apr 2012
Post: #7
RE: Never-ending resource??
(22-04-2012 10:56 PM)Swixel Wrote:  If memory serves, they're stored in the map data, which is a ZLIB format nobody has bothered with from what I remember. (Ford's crashes, and I've never had any luck with zlib, so ends the HPK extractors I know of Tongue)

To mod it you'd be looking at tweaking a function.

As for modding the XBox, I'd need to talk to someone with an XBox version again, but I think there's a way to get around various issues on the unmodded, non-sdk, builds.

Hi Swixel, I modified the Mine.lua and MineImpl.lua, increase the num_workers under Game directory, but seems they do not work, and I removed the whole Building directory, no error occurred when running the game(I extracted the game.phk, and remove it from the directory). In your other threads, you said it may not work in MT, then how to mod it?
23-04-2012 05:15 AM
Find all posts by this user Quote this message in a reply
Swixel Offline
Epic Member
*******

Posts: 1,087
Joined: Sep 2011
Post: #8
RE: Never-ending resource??
I meant something dodgy like this:

Code:
MineImpl.GetResourceAmount = function(self, res_type)
   return 1000 -- To infinity and beyond
end

"I am not ashamed to confess I am ignorant of what I do not know" ― Cicero.

"You had to hand it to the Patrician, he admitted grudgingly. If you didn't, he sent men to come and take it away." ― Terry Pratchett (Guards! Guards!)
23-04-2012 05:34 AM
Find all posts by this user Quote this message in a reply
Little Dragon Offline
Tropican scholar
*****

Posts: 463
Joined: Feb 2010
Post: #9
RE: Never-ending resource??
there's no any unlimited resource in the Earth.

As for the salt mines in T4, unless being located along the seashore, there must be a limit to exploit, too.

Btw, meaningless for the gameplay if a goldmine never ends.
23-04-2012 08:11 AM
Find all posts by this user Quote this message in a reply
Swixel Offline
Epic Member
*******

Posts: 1,087
Joined: Sep 2011
Post: #10
RE: Never-ending resource??
(23-04-2012 08:11 AM)Little Dragon Wrote:  there's no any unlimited resource in the Earth.

As for the salt mines in T4, unless being located along the seashore, there must be a limit to exploit, too.

Btw, meaningless for the gameplay if a goldmine never ends.

I don't think anyone suggested it was a good idea, or even balanced. It was "is it possible". I can think of reasons you'd want to setup a campaign like that.

"I am not ashamed to confess I am ignorant of what I do not know" ― Cicero.

"You had to hand it to the Patrician, he admitted grudgingly. If you didn't, he sent men to come and take it away." ― Terry Pratchett (Guards! Guards!)
23-04-2012 11:07 AM
Find all posts by this user Quote this message in a reply
chenjywz Offline
Newbie
*

Posts: 6
Joined: Apr 2012
Post: #11
RE: Never-ending resource??
(23-04-2012 11:07 AM)Swixel Wrote:  
(23-04-2012 08:11 AM)Little Dragon Wrote:  there's no any unlimited resource in the Earth.

As for the salt mines in T4, unless being located along the seashore, there must be a limit to exploit, too.

Btw, meaningless for the gameplay if a goldmine never ends.

I don't think anyone suggested it was a good idea, or even balanced. It was "is it possible". I can think of reasons you'd want to setup a campaign like that.

I agree with you Big Grin, to me, it just a challenge.

I add following codes to your nolimits.lua, now the num_workers has been changed to 10, but the amount and others do work.

MineImpl.GetResourceAmount = function(self, res_type)
return 100000
end
g_Classes.Mine.amount = 40000
g_Classes.Mine.radius = 40000
g_Classes.Mine.num_workers = 10
23-04-2012 01:46 PM
Find all posts by this user Quote this message in a reply
lynnk Offline
Member
***

Posts: 81
Joined: Mar 2008
Post: #12
RE: Never-ending resource??
(22-04-2012 11:45 PM)ivory_malinov Wrote:  My borehole mines still deplete a resource then sit there doing nothing. I thought they tapped a never ending supply?

I thought so too but my borehole mines also deplete the resource and then produce nothing..... they also seem to deplete the resource much faster than the regular mine too....
23-04-2012 02:57 PM
Find all posts by this user Quote this message in a reply
chenjywz Offline
Newbie
*

Posts: 6
Joined: Apr 2012
Post: #13
RE: Never-ending resource??
(23-04-2012 01:46 PM)chenjywz Wrote:  
(23-04-2012 11:07 AM)Swixel Wrote:  
(23-04-2012 08:11 AM)Little Dragon Wrote:  there's no any unlimited resource in the Earth.

As for the salt mines in T4, unless being located along the seashore, there must be a limit to exploit, too.

Btw, meaningless for the gameplay if a goldmine never ends.

I don't think anyone suggested it was a good idea, or even balanced. It was "is it possible". I can think of reasons you'd want to setup a campaign like that.

I agree with you Big Grin, to me, it just a challenge.

I add following codes to your nolimits.lua, now the num_workers has been changed to 10, but the amount and others do work.

MineImpl.GetResourceAmount = function(self, res_type)
return 100000
end
g_Classes.Mine.amount = 40000
g_Classes.Mine.radius = 40000
g_Classes.Mine.num_workers = 10

after adding "g_Classes.LargeGoldMarker.Amount = 20000000", now the gold amount per mine changed to 20000000, it should be enough, but I still don't know how to overwrite the function GetResourceAmount to make it never-ending. Great thanks to Swixel.
23-04-2012 03:25 PM
Find all posts by this user Quote this message in a reply
SapphireBullets Offline
Member
***

Posts: 119
Joined: Feb 2012
Post: #14
RE: Never-ending resource??
(22-04-2012 11:45 PM)ivory_malinov Wrote:  My borehole mines still deplete a resource then sit there doing nothing. I thought they tapped a never ending supply?
They should dig out the resource and then keep producing a reduced amount once it's depleted. :/
23-04-2012 04:16 PM
Find all posts by this user Quote this message in a reply
FordGT90Concept Offline
Senior Member
****

Posts: 202
Joined: Oct 2009
Post: #15
RE: Never-ending resource??
(22-04-2012 10:56 PM)Swixel Wrote:  If memory serves, they're stored in the map data, which is a ZLIB format nobody has bothered with from what I remember. (Ford's crashes, and I've never had any luck with zlib, so ends the HPK extractors I know of Tongue)

To mod it you'd be looking at tweaking a function.

As for modding the XBox, I'd need to talk to someone with an XBox version again, but I think there's a way to get around various issues on the unmodded, non-sdk, builds.
I just took a quick peek at Tropico 4\Packs\maps\Alianza.hpk

HPK Archiver had no problem extracting it. Inside is a .bin, lots of .grid, and lots of .lua. None are compressed. .bin appears to be composed mostly of a 8 byte structure. .grid files look like a binary table (grid). All .grid files likely have the same dimensions specified in one of the .lua files. .lua files are like you'd expect for any other .lua file. Resources like Oil and Gold appear to be in objects.lua.
(This post was last modified: 29-04-2012 11:23 AM by FordGT90Concept.)
23-04-2012 07:10 PM
Find all posts by this user Quote this message in a reply
Swixel Offline
Epic Member
*******

Posts: 1,087
Joined: Sep 2011
Post: #16
RE: Never-ending resource??
(23-04-2012 07:10 PM)FordGT90Concept Wrote:  I just took a quick peek at Tropico 4\Packs\maps\Alianza.hpk

HPK Archiver had no problem extracting it. Inside is a .bin, lots of .grid, and lots of .lua. None are compressed. .bin appears to be composed mostly of a 8 byte structure. .grid files look like a binary table (grid). All .grid files likely have the same dimensions specified in one of the .lua files. .lua files are like you'd expecte for any other .lua file. Resources like Oil and Gold appear to be in objects.lua.

I was thinking of challenges, which still break (at least for me). They're using a different chunksize, if that makes any difference. I've still had no luck with zlib, but I also haven't had the patience to play with it much either.

"I am not ashamed to confess I am ignorant of what I do not know" ― Cicero.

"You had to hand it to the Patrician, he admitted grudgingly. If you didn't, he sent men to come and take it away." ― Terry Pratchett (Guards! Guards!)
23-04-2012 08:24 PM
Find all posts by this user Quote this message in a reply
chenjywz Offline
Newbie
*

Posts: 6
Joined: Apr 2012
Post: #17
RE: Never-ending resource??
I extracted the map, and find some statements such as follows from reversed objects.lua, then how to change the amount?
l_0_4 = {__class = "ResourceMarker", Pos = point(49900, 121450), ColorModifier = RGBA(97, 97, 97, 0), Walkable = false, BlockPass = false, Collision = false, Amount = 15000, Type = "Salt"}

another issue is that the challenge maps can't be extracted by your HPK Archiver, if it were, I can find the main difference between normal resource marker and challenge marker.
(This post was last modified: 29-04-2012 03:48 AM by chenjywz.)
29-04-2012 02:56 AM
Find all posts by this user Quote this message in a reply
Swixel Offline
Epic Member
*******

Posts: 1,087
Joined: Sep 2011
Post: #18
RE: Never-ending resource??
(29-04-2012 02:56 AM)chenjywz Wrote:  another issue is that the challenge maps can't be extracted by your HPK Archiver, if it were, I can find the main difference between normal resource marker and challenge marker.

There isn't one.

"I am not ashamed to confess I am ignorant of what I do not know" ― Cicero.

"You had to hand it to the Patrician, he admitted grudgingly. If you didn't, he sent men to come and take it away." ― Terry Pratchett (Guards! Guards!)
29-04-2012 08:35 AM
Find all posts by this user Quote this message in a reply
FordGT90Concept Offline
Senior Member
****

Posts: 202
Joined: Oct 2009
Post: #19
RE: Never-ending resource??
Challenge .hpk files are not only zipped (ExtractZippedFile worked fine on it), the "Linker" collection (my name) is different and kind of strange (each file is broken into smaller parts for no obvious reason). I looked at adding support to HPK Archiver and I think it would make the user interface too complicated without completely rewriting it. I'm so not in the mood to do that so I'll probably just copy the source, make the necessary changes, and release it as a separate application.

The challenge I made (just created and saved) only has 12 files in it.


...don't want to "fix" what isn't broken either. XD

...I might see a way forward that wouldn't require changing the GUI much but, I need to read the headers of all the files to make sure my theory is correct...

...only one other file has more than one "part," ShaderCache.hpk. I'm thinking I'm going to try to make HPK Archiever decompress hpks with parts and hopefully, Tropico 4 won't complain when it reads it back with only 1 part instead of 8.

...ShaderCache.hpk is now successfully extracting (before, all the files were empty). Now to make sure I didn't break the rest...

...looks like it didn't break anything. Now to make it auto-detect and extract entirely zipped files...

...extracted--looks successful. Now to add an option to zip the entire HPK...

...found an unrelated bug in archiving and squashed it. Working on tidying up a bunch of stuff...

...uploaded: http://www.techpowerup.com/forums/showth...ost1733957
(This post was last modified: 29-04-2012 05:05 PM by FordGT90Concept.)
29-04-2012 12:19 PM
Find all posts by this user Quote this message in a reply
phenoyz Offline
Member
***

Posts: 73
Joined: Sep 2011
Post: #20
RE: Never-ending resource??
(22-04-2012 11:13 AM)chenjywz Wrote:  Is is possible to make gold mine to became a never-ending resource such like salt mine? If the answer is yes, then does anyone know how to do it?

This would be VERY UNREALISTIC....and childish

Thats why if there is a "Military"/ "Multi-Player" option:

If you are a good leader, you develop your tropico well, make it rich,strong,
modernize your military, make it powerful, once you foresee your resources dwindling......
---INVADE--> other country for its resources!!! just like what---> USA/China is doing--->OIL...
This is more realistic !!!!!

The Prince - Niccolo Machiavelli, Best Book ever published
(This post was last modified: 30-04-2012 11:56 PM by phenoyz.)
30-04-2012 06:42 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | kalypso media :: website | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication