Page 1 of 1
Item index
Posted: Wed Oct 09, 2013 6:49 pm
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
Re: Item index
Posted: Wed Oct 09, 2013 6:58 pm
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...
Re: Item index
Posted: Wed Oct 09, 2013 7:44 pm
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.
Re: Item index
Posted: Wed Oct 09, 2013 8:09 pm
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
Re: Item index
Posted: Thu Oct 10, 2013 8:51 pm
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.
Re: Item index
Posted: Thu Oct 10, 2013 9:04 pm
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.
Re: Item index
Posted: Thu Oct 10, 2013 11:45 pm
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.
Re: Item index
Posted: Fri Oct 11, 2013 12:20 am
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.
Re: Item index
Posted: Fri Oct 11, 2013 12:37 am
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
Re: Item index
Posted: Fri Oct 11, 2013 7:19 am
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 ^^