Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Jan 17, 2017 2:42 am

All times are UTC




Post new topic  Reply to topic  [ 1188 posts ]  Go to page Previous 156 57 58 59 60
Author Message
PostPosted: Sat Nov 26, 2016 9:08 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 1485
Location: Newcastle, Australia
Hi Pyoro and frosch,

I seem to have won and not getting any undefined string messages now. At least not see any visible.

What I done in the language files for instance like Pyoro mention I reduced the strings on many of the objects from this:

Code:
STR_reef4                  :Reef Large Rocks
STR_reef4_purchase_view1   :Reef Rocks
STR_reef4_purchase_view2   :Reef Rocks
STR_reef4_purchase_view3   :Reef Rocks
STR_reef4_purchase_view4   :Reef Rocks


to this

Code:
STR_reef4            :Reef Large Rocks


There would have been over 100 entries that I was able to change like that above and still some I can change in the other object sets I done and doing.

And in the NML file I delete the code for the string switch (switch (FEAT_OBJECTS, SELF, switch_add_text_STR_reef4, view) ...). Not needed anymore, obviously.

Also changed reference to the PURCHASE sprites.

Code:
spriteset (spriteset_reef4_PURCHASE) {
    template_building_low(0,0,"gfx/reef4.png")
}


I did this for all objects that the Purchase sprite was same size as the normal sprite.

frosch wrote:
About your sprite sharing: You can share sprites between different graphic chains and even different objects just fine. Sharing them reduces memory usage.


Good if I can do this, I will alter the class and classnames again so this will share same chains.

Thank you all kindly for your help in solving this problem.

Cheers fellas

Garry

_________________
Soot Happens
All my projects are GPLv2 License.
AuzTrains & NSWTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
AuzInd (Industry Set): http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: http://www.tt-forums.net/viewtopic.php?f=26&t=74510
AuzBridges: viewtopic.php?f=26&t=75248


Top
   
PostPosted: Wed Nov 30, 2016 11:36 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1277
Location: The Netherlands
Suggestion:
Not sure if it is at all possible (if not please ignore this ;-) )

I often like to make minute changes to other GRFs, replacing just certain graphics and keeping the rest as is. (for example I have edited the UK-roadset in my games in such a way that it displays sidewalks also on rural roads)
Now I do this by recompiling the edited GRF, just with a change to the original name and keeping the same GRF-ID, so I can easily find it in my unused GRF-list next to its original version and it will also not disrupt my save-games or scenarios.

However, in some cases depending on the license of the GRF, these kind of changes are not allowed to be publically released and one needs to contact the original creator(s) of the GRF and donate these sprites, hoping they will be implimented (or implimented as extra option via parameter). This process can take up some time as some creators cant be contacted easily or dont want to make the changes to their GRF.
An example I could give for this is with one of my own sets, the Fake Airport Objects. For the taxiways I use yellow lines, some people suggested that they would like these lines to be thinner/sharper. I dont agree ;-) Therefor I wont impliment this (not even as a parameter, I really dont like the look of it ;-) ). The set is GPL licensed though, so someone else could make these changes and re-release the set, but if they dont add it as a parameter they will need to release it as a completely separate set, including also graphics that havent been changed.
But hopefully that wont be necessary anymore if my suggestion is feasible....

Therefor I would like to know if it is possible to have an option to change graphics within a GRF, working a bit like Action-5 in NFO for replacing base set sprites not present in the original TTD.
For example, by combining the unique GRF-ID of a GRF with an offset to the graphics within it that you want to change.

Is this at all possible and if so, interesting enough to impliment?

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Sat Jan 07, 2017 10:36 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 1485
Location: Newcastle, Australia
Bounding Boxes.

Can anyone tell me how to add bounding boxes to my coding?

Been told could be reason I having a few graphic issues in the object sets I doing.

Cheers

_________________
Soot Happens
All my projects are GPLv2 License.
AuzTrains & NSWTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
AuzInd (Industry Set): http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: http://www.tt-forums.net/viewtopic.php?f=26&t=74510
AuzBridges: viewtopic.php?f=26&t=75248


Top
   
PostPosted: Sun Jan 08, 2017 12:14 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Dec 20, 2006 1:31 pm
Posts: 946
Location: Aschaffenburg
Bounding boxes are mostly a myth. While there is a thing called "bounding boxes" in the game, I am 99% sure whoever hinted towards them did not know how bounding boxes work, and bounding boxes won't help fix your issues.
The purpose of bounding boxes is to sort sprites within a tile. But in case of NewObjects there is only one thing on the tile (your object), so there is not much to sort. People often think they can use bounding boxes to sort stuff against stuff on neighbouring tiles, however bounding boxes have hardly any influence on that. (mostly because bounding boxes only affect "how" to draw, but not "what" to draw)

Regarding bounding boxes:
For NewObjects the only part you may possibly want to adjust is "zextent" in the "building" part of your "spritelayout".
Set it to approximately reflect the height of your object. That helps in case of bridges next to your object.

Regarding glitches:
You need to distinguish two types of glitches:
* Glitches because sprites change the order they are drawn in. ("how" to draw)
* Glitches because sprites are skipped, and not drawn at all. ("what" to draw)

Bounding boxes help in the first case, but not in the second.
The most often glitch I see is the second case, when sprites extent over the left or right corner of the tile. In that case you have to cut the object more precisely. (Changing bounding boxes does not affect this, because this is an issue about "what" to draw, and bounding boxes have no influence on that)

_________________
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁


Top
   
PostPosted: Sun Jan 08, 2017 12:28 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 1485
Location: Newcastle, Australia
Thank you kindly frosch for explain that too me.

Much appreciated and a relief as not need to find out how to install it.

Cheers pal

_________________
Soot Happens
All my projects are GPLv2 License.
AuzTrains & NSWTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
AuzInd (Industry Set): http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: http://www.tt-forums.net/viewtopic.php?f=26&t=74510
AuzBridges: viewtopic.php?f=26&t=75248


Top
   
PostPosted: Thu Jan 12, 2017 9:17 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 1485
Location: Newcastle, Australia
I having a play around with my Industry set seeing if I can figure out what different codes do and where to find things.

I playing around with a Industry to open a certain date or close before a certain date.

When I insert this code:
Code:
/* Allow only within the availability years */
switch (FEAT_INDUSTRIES, SELF, timber_siding_check_availability, current_date) {
 date(1840,1,1) .. date(5000000,12,31): timber_siding_available_game_mode;
 return CB_RESULT_IND_NO_CONSTRUCTION;
}


I get this error:
Quote:
Unrecognized identifier 'timber_siding_available_game_mode' encounted


Can someone tell me what am I missing?

Thanks kindly

_________________
Soot Happens
All my projects are GPLv2 License.
AuzTrains & NSWTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
AuzInd (Industry Set): http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: http://www.tt-forums.net/viewtopic.php?f=26&t=74510
AuzBridges: viewtopic.php?f=26&t=75248


Top
   
PostPosted: Thu Jan 12, 2017 11:44 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 8991
Location: Sol d
GarryG wrote:
I get this error:
Quote:
Unrecognized identifier 'timber_siding_available_game_mode' encounted


Can someone tell me what am I missing?


It is not defined in the code above. Does it exist or did you mis-spell it?

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Thu Jan 12, 2017 12:11 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 1485
Location: Newcastle, Australia
checked and re-check spelling and all looks correct.

The code is what I copied from the Oil_Rigs and I just changed the file it reference to.

Seems like I left some other code out .. as you mentioned "It is not defined in the code above."

I'll sleep on it tonight and try again a fresh in morning.

Cheers and thanks for helping

_________________
Soot Happens
All my projects are GPLv2 License.
AuzTrains & NSWTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
AuzInd (Industry Set): http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: http://www.tt-forums.net/viewtopic.php?f=26&t=74510
AuzBridges: viewtopic.php?f=26&t=75248


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1188 posts ]  Go to page Previous 156 57 58 59 60

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.