modding noob needs general help

Place to get help with not working mods / modding interface.
Post Reply
meems
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Feb 15, 2017 2:02 am
Contact:

modding noob needs general help

Post by meems »

Modding noob here. I've being trying to understand the code but its no good, its too cryptic for me. Will use all the help I can get.

I've managed to get a template empty mod working, but that's all.

I've been trying to find code for solar and steam power. Where are the file which sets the power output ?

I've guessed somewhere in a recipe or prototype folder but I cant find them.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: modding noob needs general help

Post by daniel34 »

The code is in data\base\prototypes\entity\entities.lua, just search for solar-panel.
Most entity prototypes are defined in entities.lua and other files in that folder, entities that also appear in the demo are prefixed with demo-, e.g. the steam engine is found in demo-entities.lua.

The example here is for 0.12 but the advice (and data.lua) is still good: viewtopic.php?f=33&t=21594
quick links: log file | graphical issues | wiki

meems
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Feb 15, 2017 2:02 am
Contact:

Re: modding noob needs general help

Post by meems »

thanks. thats got me started.
would you believe i am so dumb? I was working all last night trying to mod factorio, and the whole time I didn't realise I had 2 versions installed, the demo and the full verion, i was modding the demo, but running the full, and get exasperated that nothing i did had any effect.
Got some stumbling to do for the next few months before I get decent at this.

User avatar
darkshadow1809
Filter Inserter
Filter Inserter
Posts: 306
Joined: Thu Jan 15, 2015 10:13 pm
Contact:

Re: modding noob needs general help

Post by darkshadow1809 »

meems wrote:thanks. thats got me started.
would you believe i am so dumb? I was working all last night trying to mod factorio, and the whole time I didn't realise I had 2 versions installed, the demo and the full verion, i was modding the demo, but running the full, and get exasperated that nothing i did had any effect.
Got some stumbling to do for the next few months before I get decent at this.
Ehh dont worry dude. I am here for a solid 1-2 years now and still run into occasional trouble with modding dont give up. Its definitely fun if you see the end result eventually.

Hope to see your mods around some day 8-)
ShadowsModpackDevelopment

meems
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Feb 15, 2017 2:02 am
Contact:

Re: modding noob needs general help

Post by meems »

Any recommendations for writing map generators?

The 'blank canvas' style of the base map is such a waste wrt to the core strategy of space management.
I've found its possible to greatly increase water cover by adjusting

Code: Select all

 elevation_max_range = 8000, -- 5000 everywhere below elevation 0 and nowhere else 
in the tiles file , water_autoplace_settings function. Don't know why it does that since the code is so cryptic.

while this is significant improvement over the blank canvas, it does not force the high resolution space management that is desirable.

I'd like to generate a 'marsh land' style water map, with water tiles being an inhibiting factor in every decision to expand the factory complex.

meems
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Feb 15, 2017 2:02 am
Contact:

Re: modding noob needs general help

Post by meems »

i've actually got a marshland style map working, randomly every one in seven rectangles is water.
Did it just by trial and error finding a place in a mod to send a true or false value, which set water or land. Good progress, but I don't understand it.

But I don't want the whole map to be marsh land.

I'd like to know how to question a tile, to see if its water.

Code: Select all

if position(x,y).water == true then
 ...
would this work?

Post Reply

Return to “Modding help”