New Terrain Generator

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

User avatar
Mickeye
Chief Executive
Chief Executive
Posts: 751
Joined: 08 Apr 2005 19:09
Location: Kromeriz, Czech Republic

Post by Mickeye »

Thank you Wally, I never thought LandGen cheat exist and this really help me, and off course not only me, making nice looking scenarios. :))
Image
Mickeye on devArt | Last.fm || Winner of "Best TT-Forums signature, 2006" award
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Post by wallyweb »

Mickeye wrote:Thank you Wally, I never thought LandGen cheat exist and this really help me, and off course not only me, making nice looking scenarios. :))
You're welcome but the ones to really thank are those amazing developers who keep coming up with all these neat features. 8)
User avatar
ISA
Tycoon
Tycoon
Posts: 3384
Joined: 17 Oct 2005 20:56
Location: Estonia

Post by ISA »

Hi!
Maybe I should post it into TTDPatch problem section, but ohh well.....
I have little problem.... When I type into sign cht: landgen 2 40 2 It generate nice map (flat, with water etc). But if I choose 'New Game' game asks if I wanna start new game. I answer yes and after that game just freeze. No crash log and in task manger ttd is not responding! I'm using nightly 1430!
And what I should post here? Save game, cfg?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Badger
Tycoon
Tycoon
Posts: 7040
Joined: 10 Sep 2006 19:12
Location: Adwick-Le-Street.

Post by Badger »

Is it possible to specify the number of towns when creating a random map? I never seem to get just the right amount (about 20 +/-2)!
|||| My OTTD/TTDP pics ||||Currently slighty obsessed with getting Platinum Trophies||||Retired moderator||||
User avatar
ISA
Tycoon
Tycoon
Posts: 3384
Joined: 17 Oct 2005 20:56
Location: Estonia

Post by ISA »

He!
I have one problem again!
I'm using nightly 1518 and if I wanna create map (like Cht: landgen 10 35 10 - its map with some water and hills) or some other map/cht the game shows me that cheat was successful, but if I start new game the map haven't change! There is lots of flat land with few small lakes!
My experimentalfeatures is set to 48
Some help would be useful :)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Ask Uzurpator what happened.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
ISA
Tycoon
Tycoon
Posts: 3384
Joined: 17 Oct 2005 20:56
Location: Estonia

Post by ISA »

DaleStan wrote:Ask Uzurpator what happened.

Ill hope he is reading this thread when he is online!
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Post by minime »

The last changes made by Urzupator to the terrain gen completely disable (well, to be correct "plainly ignore the existence of") the LandGen cheat.

I've started working on cleaning up and fixing the current incarnation of the code as well as reenabling the cheat, however real life has stepped in and it will take a while longer to finish.

minime
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

Well.

I don't know how the cheat works, so I couldn't make any provisions for it in the latest refresh of the code (there was a massive change in the structure of the code)

I can provide a function which will make it work, but I need to know what actually was called before.
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Post by minime »

Looking at the previous revision of cwrap.c would help - specifically http://svn.ttdpatch.net/trac/browser/tr ... c?rev=1328 lines 209 - 213
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

Neat.

I'll fix it asap - altho - this things are not in my version - they were added when I couldn't commit or update my copy of the repository.

BTW - how to extend the cheat to say - 5 parameters?
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Post by minime »

Well, at the moment, the cheat packs the parameters into one DWORD.

Initially the value of this variable is 0xFFFFFFFF (-1), which is also used to represent "cheat off". When the cheat is used, the parameters are packed into the low 3 bytes of this variable, with the high byte being set to zero.

In my rewrite, I have extended the cheat by using bits 24-30 as an extra parameter, used to specify the terrain generation method (basically to enable the user to pick which one of your "themes" to use). Bit 31 is still used to determine the "cheat on/off" state.

If you need more than that, it will be necessary to enlarge the variable used to store the parameters. Unfortunately I don't know enough about patch coding to be able to reliably guide you there. All I know is that the cheat values are stored by code in signcht.asm (label landgencheat).

----

Hmm, after looking at the code, the variable landgen_forceparam is defined only in signght.asm, so extending that should be easy.

minime
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

The best way to get more space is probably to change the variable's declaration to "svard landgen_forceparam, 2", which will give you a two dwords, both initialized to -1. The extern in the C code will have to be changed to match, of course: "extern int32_t landgen_forceparam[2] asm("landgen_forceparam")". Alternatively, you could add a second variable of a smaller width (svar[bw]), but that would require two variable names, and is probably not worth the hassle.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

LandGen cheat should work properely now :)
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Post by Dave »

uzurpator wrote:LandGen cheat should work properely now :)
Can you give us some idea of how to use it? There's no documentation?
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Ameecher
Tycoon
Tycoon
Posts: 11919
Joined: 12 Aug 2006 15:39
Contact:

Post by Ameecher »

Tried looking here Dave?
Image
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Post by Dave »

Hardly a lot of information? Is there no specific information?
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Mickeye
Chief Executive
Chief Executive
Posts: 751
Joined: 08 Apr 2005 19:09
Location: Kromeriz, Czech Republic

Post by Mickeye »

I was trying Cht: LandGen in few latest nighlies and it doesn't wok in same way as LandGen cheat in older nightlies (before r1456). Is there some sort of info how LandGen cheat works in nightlies after r1558? If no, could be someone so kind and write new info? Thanks in advance.
M.
Image
Mickeye on devArt | Last.fm || Winner of "Best TT-Forums signature, 2006" award
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 14 guests