GSTile::DemolishTile

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

GSTile::DemolishTile

Post by Aphid »

When no GSCompanyMode is active, should this still work?

Like GSIndustry::ProspectIndustry, I think it should, so that a script can remove trees, town buildings, and so on.
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: GSTile::DemolishTile

Post by krinn »

This would allow player and AI to cheat too. (of course with a specialy made GS for that purpose).

Anyway, this woud be a step to the ultimate question: should GS get free money.

For now that ultimate question has been answered to no.
Don't ask me why, as i'm not against it personnaly, not because of the cheating abilitiy, as i see no problem as to cheat, you will still need a "allow to cheat GS" for that.
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: GSTile::DemolishTile

Post by Aphid »

Well, you can technically already do this, press control-C, turn on magic bulldozer, voila.

The real deal here is allowing a GS to remove the things it can already place such as houses, trees, and so forth.

Of course someone's going to design an 'armageddon' GS that will randomly nuke squares, but hey, that's fun right :P
stinkyfax
Engineer
Engineer
Posts: 28
Joined: 28 Mar 2013 20:12

Re: GSTile::DemolishTile

Post by stinkyfax »

I would join Aphid in discussion, give servers more flexibility to enhance game. That way we'll see more diversity and interesting modes.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: GSTile::DemolishTile

Post by Zuu »

I believe it is not just GSTile::DemolishTile that may be interesting to adopt.

When I made the change to allow GSes to build/prospect industries, that took a couple of hours. In that case it was not just a flag that needed to be changed but quite a bit more as the command to build industry itself decided if a player was to prospect/build depending on game settings, thus this command needed an aditional parameter when used from GS. All this then need a test GS to verify both the intended usage and preferable also that the command fail in the correct way.

As you see, even if it may sound like a simple change, it will take some time to accomplish.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: GSTile::DemolishTile

Post by krinn »

Aphid wrote:Well, you can technically already do this, press control-C, turn on magic bulldozer, voila.
No, as this be recorded and everyone could saw you've cheated.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: GSTile::DemolishTile

Post by Wahazar »

We are making a GS for building industry during the game, basing on Zuu's TileLabels lib.
Industry is labelled on the map, and (with some random range, also labelled on the map) placed if certain date was reached.
(ManualIndustry.grf or other with locked in_game_prop must to be used).

I want to extend this script and allow also to demolish industry after certain date - but it seems not feasible.

I cannot recognize above anti-cheating arguments - why GS can build but cannot destroy?
Even scripted industry building or any others GS actions can be treated as a cheat in single player,
probably any use of GS should be recorded, if you want to make single player contests.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: GSTile::DemolishTile

Post by Alberth »

McZapkie wrote:I want to extend this script and allow also to demolish industry after certain date - but it seems not feasible.

I cannot recognize above anti-cheating arguments - why GS can build but cannot destroy?
NewGrf specs do not allow control of industry closure from the outside, the industry itself is the only one that can decide that.

Personally, I think it's a bad idea to let the industry decide that, but that's how it is currently.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: GSTile::DemolishTile

Post by frosch »

Nah, closing from the outside is fine. That's what magic bulldozer does.

Doing the inverse (preventing from closure) is the thing that fails with certain NewGRF.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 42 guests