Making an industry
Moderator: Graphics Moderators
- FulliAutomatix
- Engineer
- Posts: 119
- Joined: 24 Aug 2014 12:20
- Location: Kaon Prison, Cybertron
Making an industry
I've been having a crack at making an industry, and so far I've got this code
I've been referencing the NML documentation and a very basic and not very useful OpenGFX Industries file, but I can't figure out really where to go from here. I've got graphics for it ready.
Could some please explain how industries work in NML or give me a reference to a fully defined (preferebly new) industry already or source code to a GRF? Thanks in advance
I've been referencing the NML documentation and a very basic and not very useful OpenGFX Industries file, but I can't figure out really where to go from here. I've got graphics for it ready.
Could some please explain how industries work in NML or give me a reference to a fully defined (preferebly new) industry already or source code to a GRF? Thanks in advance
Some links to stuff I've made:
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=- | -=Heightmaps collection=-
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=- | -=Heightmaps collection=-
Re: Making an industry
I posted a sample industry that might help you get started at viewtopic.php?f=68&t=76669#p1188871
Re: Making an industry
I was about to post the same thing. How do i link the graphics from my GRF file ?
Here's my code yet :
Here's my code yet :
Code: Select all
grf {
grfid: "gb\01\05";
name: string(STR_GRF_NAME);
desc: string(STR_GRF_DESC);
version: 0;
min_compatible_version: 0;
}
cargotable {PASSENGERS}
switch(FEAT_INDUSTRIES, SELF, indu_transported_switch, transported_last_month_pct_1) {
0: return CB_RESULT_IND_PROD_NO_CHANGE;
1..44: return CB_RESULT_IND_PROD_DECREMENT_BY_1;
45..64: return CB_RESULT_IND_PROD_NO_CHANGE;
return CB_RESULT_IND_PROD_INCREMENT_BY_1;
}
item(FEAT_INDUSTRIES, indu_hotel) {
property {
substitute: ;
override: ;
accept_cargo_types: [cargotype("PASSENGERS", "GOODS"];
prod_cargo_types: [cargotype("PASSENGERS", "GOODS")];
prod_multiplier: [30];
prob_in_game: 0;
prob_random: 7;
life_type: IND_LIFE_TYPE_PROCESSING;
nearby_station_name: string(STR_HOTEL_STATION_NAME);
spec_flags: 0;
}
graphics {
monthly_prod_change: indu_transported_switch;
random_prod_change: CB_RESULT_IND_PROD_NO_CHANGE;
build_prod_change: return 4;
}
}
Re: Making an industry
Industries don't generally have graphics. Industry tiles do, and then the layouts property of the industry provides the tile arrangement(s) to be built.
Re: Making an industry
How do i then link the industry tiles code to the industry properties code ?
Re: Making an industry
Use the layouts property of the industry to tell it which tiles to build as part of the industry.
- FulliAutomatix
- Engineer
- Posts: 119
- Joined: 24 Aug 2014 12:20
- Location: Kaon Prison, Cybertron
Re: Making an industry
I've got this to compile, but it won't place anywhere in game.
As in, it always pops up as "Site unsuitable".
Any ideas?
As in, it always pops up as "Site unsuitable".
Any ideas?
Some links to stuff I've made:
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=- | -=Heightmaps collection=-
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=- | -=Heightmaps collection=-
Who is online
Users browsing this forum: Amazon [Bot] and 79 guests