[Unsolved]Technology Descriptions

Place to get help with not working mods / modding interface.
Hellaciouss
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 22, 2016 7:15 pm
Contact:

[Unsolved]Technology Descriptions

Post by Hellaciouss »

Hello,

Having an issue here with descriptions for technology.

I am trying to create an addition tier of solar power/

Here is the small issue I'm having;

Image

The technology description here is being pulled form the solar_energy technology description

I have it set up in my locale file here as solar_energy_2 as the tech name and solar_energy_2 tech description as Allows access to a more efficent and smaller version of the larger solar panel as you can see here

How do it get it to pull the solar_energy_2 tech description instead of the solar_energy one?

Image
Last edited by Hellaciouss on Wed Mar 23, 2016 8:17 pm, edited 3 times in total.
Hellaciouss
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 22, 2016 7:15 pm
Contact:

Re: Technology Descriptions

Post by Hellaciouss »

I've solved my problem and I feel a bit silly.

In my technology.lua file I had

Code: Select all

type = "technology",
name = "solar-energy-2"
And it needed to be:

Code: Select all

type = "technology",
name = "solar_energy_2",
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [Solved]Technology Descriptions

Post by daniel34 »

I would advise you to use dashes (-) instead of underscores (_) as word-separator because all entities/items/recipes in Factorio and most other mods are already written that way and it is easier to understand your code if someone else reads it (in code, the _ is already used for function names).
quick links: log file | graphical issues | wiki
Hellaciouss
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 22, 2016 7:15 pm
Contact:

Re: [Solved]Technology Descriptions

Post by Hellaciouss »

daniel34 wrote:I would advise you to use dashes (-) instead of underscores (_) as word-separator because all entities/items/recipes in Factorio and most other mods are already written that way and it is easier to understand your code if someone else reads it (in code, the _ is already used for function names).
I've been unable to add custom technology descriptions to tier'd technology unless I use _'s. When I use -'s it just defaults to the tier 1 description. Is there another way around this? I do notice I get the little nifty 2 or 3 on the technology icon when I use the -'s though, which is neat, but again, I am unable to have a custom description to the "-2" addition.

It seems like it's something that would need to be changed by devs as none of the tier'd tech have additional descriptions. They either have none or default to the tier 1 description.
Hellaciouss
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 22, 2016 7:15 pm
Contact:

Re: [Unsolved]Technology Descriptions

Post by Hellaciouss »

Anyone able to shed some light onto how this could be done? Still unable to find a way to add a different description to the technology while keeping the -2 (the number 2 on the bottom right hand of the tech icon)
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3717
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [Unsolved]Technology Descriptions

Post by DaveMcW »

I don't think you can. If the description is that important to you, rename the tech solar-energy-two.
Post Reply

Return to “Modding help”