Item index

Ideas, that are too old (too much things changed) or won't be implemented cause of some reasons or if there are obvious better suggestions.

Moderator: ickputzdirwech

Post Reply
User avatar
Math3vv
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Sun Oct 06, 2013 10:47 am
Contact:

Item index

Post by Math3vv »

Random idea that makes (atleast i think it does) the game more simple.

an index that gives every item a value for exsample :
wood = 1
stone = 2
...
...

this would make altering a crafting resipe and some modding allot easyer !

let me know what you think

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Item index

Post by Nirahiel »

It's a bad idea !
Text based indices are way better than number based ones because of the limit.
Also it's easier to remember that "wood" is wood, rather than "1" is wood...

kovarex
Factorio Staff
Factorio Staff
Posts: 8052
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Item index

Post by kovarex »

Internally, every item has number index, but it is allocated dynamically, and the allocation depends on mods, so the wood can have different index in different saves.
(I'm quite proud of this system, this helps us to avoid mod conflicts, not like in minecraft mod community, that had shared table of IDS for resources that are reseved etc).
The only reason to access these indexes from the script I can think of is optimisation, as manipulating with numbers (and number indexed tables) might be faster, other than than, it is always better to use names, as in lua you can index by names the same way as you would with numbers.

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Item index

Post by Nirahiel »

Also kovarex, speaking of that, is it possible to have different mods per save, and why not, different versions of the same mod per save (provided that you have different folders for the same mod)
Would be awesome for mod authors :)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Item index

Post by slpwnd »

@Nirahiel If they have different names (and folder names) then it is as if they were different mods. So yes, you can have it.

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Item index

Post by Nirahiel »

What I mean is :
I want one precise sets of mods to be active for 1 save, and another set for another set, without worrying about enabling or disabling my mods.

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Item index

Post by SilverWarior »

Nirahiel wrote:What I mean is :
I want one precise sets of mods to be active for 1 save, and another set for another set, without worrying about enabling or disabling my mods.
So what you want is that each save also contains information about which mods have been used when the game was saved.
This could come in handy for avoiding unexpected crashes or unexpected behavior when you start a savegame which use certain mod that is no longer available.
But the problem would be when you wanna use diferent versions of same mod for diferent savegames. Why? If you lock some savegame to only use certain version of some mod you will encounter problems when updating such mods. Usualy it is always better to use latest version of mod.

kovarex
Factorio Staff
Factorio Staff
Posts: 8052
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Item index

Post by kovarex »

SilverWarior wrote: So what you want is that each save also contains information about which mods have been used when the game was saved.
This could come in handy for avoiding unexpected crashes or unexpected behavior when you start a savegame which use certain mod that is no longer available.
But the problem would be when you wanna use diferent versions of same mod for diferent savegames. Why? If you lock some savegame to only use certain version of some mod you will encounter problems when updating such mods. Usualy it is always better to use latest version of mod.
Actually, this is in the game already for some time. You can see all mods and their versions in the load map dialog when you select the save.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Item index

Post by FreeER »

I think what he means is that you can toggle mods per save/world, so that you can have, say, four mods installed: blueprints, Industrio, medic-mod, and solar-expansion, you play for awhile and then add another, say the treefarm-mod, and instead of loading the save and Factorio automatically adding the new mod it would ask the first time it's discovered and if you say no it ignores the new mod until you start a new game, which would have a list of the mods currently installed and allow you to toggle them for that world.

Basically, instead of having all mods in your folder being active within all worlds, allow each world to control which mods are loaded, without manually disabling the mods you do not want to use before loading a save and then re-enabling them for a different world. This would also prevent the 'replay has been discontinued due to changes to the mods' unless the player specifically accepted the new mod for that world.

Of course I could be entirely wrong, or this could be in Factorio somewhere already :)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Item index

Post by Nirahiel »

Nah FreeER you're right, I want to have different mods enabled for different saves, It's a pain to have to disable one mod and enable the other when I want to play, and then do it the other way around when I want to work on my mod ^^

Post Reply

Return to “Outdated/Not implemented”