Jump to content
  • The forum downloads section will be removed on Jan 1st 2023. Players may still download mods that are currently hosted, but new submissions are no longer being accepted. Mod makers are advised to relocate their mods to alternative hosting solutions.

Equivalent Exchange v2 (SW Compatible) v2.9.5


1 Screenshot

About This File

Equivalent Exchange v2

(SW Compatible)

Redesigned version of the original Equivalent Exchange mod. This mod allows you to convert different items into each other.

Basics:

Every item in game has an EMC value, a hidden "matter" energy, which can be converted to other items using an Alchemy and Exchanging Chests.

Changed Science Machine:

You can "give" items to a Science Machine to see, how much EMC is the item worth. Doing that will not consume the item. The machine outputs two values (248/300 EMC for ex.) - the first one is the EMC value you could get if you exchanged that stack of items right now. This value is affected by stack size, durability, freshness, internal EMC buffer etc. The second value is the actual EMC value of the item, not taking stack size or durability, etc. into account.

Changed Alchemy Engine:

You can give items to an Alchemy Engine, and they will be converted into EMC energy items (Golden nuggets, Dark Matter, etc.)

Alchemical Chest:

Because putting single items into the Alchemy Engine gets old and tedious pretty quick, there is an Alchemical Chest, which converts items placed in its inventory into Golden Nuggets.

Exchanging Chest:

An upgraded version of Alchemical Chest, the Exchanging Chest is able to convert the items in it's inventory into target item. Target item must be placed in the upper, target slot and enough EMC energy in form of other items needs to be provided.

Alchemical Researcher:

Spoiler

Alchemical Researcher will create blueprints of given items. Put the item you want the blueprint of in the upper slot, put 3 golden nuggets in the bottom (cost) slot, close the inventory and wait for the blueprint !

You can get a random blueprint when researching Knowledge Fragments - you can find more info under the 'Knowledge Fragment' spoiler.

Upgrading Chests:

Spoiler

You can upgrade Alchemical and Exchanging Chests by putting one Gold/Dark Nugget in each slot of the chest, and reopening it. Gold/Dark Nuggets will be consumed in the process...

Alchemy Chest is upgradeable with Gold Nuggets.

Exchanging Chest is upgradeable with Dark Nuggets.

After upgrading, chests will be exchanging items faster and, instead of dropping gold/items on the ground, they will store them directly in its own inventory.

Philosopher's Stone:

Spoiler

Philosopher's Stone can exchange EMC energy on-the-go. It also can be used as EMC energy storage unit. Simply place EMC energy storage item (such as Golden Nugget, Dark Matter, etc.) in it, close it and energy will be exchanged, sorted and stored. It can also exchange non-EMC energy storage item (any other item), but this process is MUCH slower than the first one. It's mainly used as a EMC storage for travel. Also, caring Philosopher's Stone in inventory causes killed creatures to drop "Energy Orbs". They have 50% chance of doing this.

Knowledge Fragment:

Spoiler

Knowledge Fragment, is an item, that can drop from almost any creature (including rabbits and birds). You can put it in Alchemical Researcher, and get a random blueprint out of it. There is a 75% chance, that it will be an EE blueprint. This allows you to for ex. make silk in spider-less worlds. If you research all EE recipes, you can use it to get any other blueprint in game. Like all other items, it contains some EMC energy inside, but it cannot be exchanged - killing creatures is the only way to get it.

Keep in mind, that this is a pretty rare item - creatures like rabbits and birds have a 0.1% (0.001 or 1/1000) chance of dropping it, so it beats 'Krampus Sack' (which has 1% (0.01 or 1/100) chance of dropping from Krampus). Chances of dropping Knowledge Fragment increases with creature difficulty.

Lightning Sword:

Spoiler

A very powerful (and expensive) sword, that can catch lightnings from the sky:

- Infinite durability

- Discharged does 50 damage

- Charged - based on percentage usage - up to 150 damage

- Super Charged - 150 damage, and ability to kill ANY creature with single lightning burst

Energy Bearing Item Tiers:

- Energy Orb - 1/40 Golden Nugget

- Golden Nugget

- Dark Matter - 20 Golden Nuggets

- Red Matter - 20 Dark Matters

- Miniature Black Hole - 20 Red Matters

Mod is crashing/not working, what I should do ?

Spoiler

If EE is crashing/not working/automatically disables itself etc., try these steps:

- Check if your mod is up to date - the issue you are experiencing may be fixed in latest update

- You can have an older version of the game - try changing the "api_version" value to 5 or 4 and trying again. "api_version" value can be found in 'modinfo.lua' file inside 'EE' folder. You can open that file with any text editor (ex. notepad)

- If you do the steps above and it's still not working/crashes etc., leave a comment below. It will be appreciated to post your log.txt and/or screen from crash along with, it really helps resolving the problem.

Compatibilities:

Spoiler

- Mod is compatible with older versions of the game

- Mod is compatible with RoG DLC

- versions 2.9.0+ should be compatible with SW DLC, if it's not, just let me know

- Mod is compatible with other mods (in most cases)

- Mod supports custom items (mod items) EMC values

Changing EMC values:

Spoiler

If you find that EMC values are to high/low, you can change EMC values modifier in "EE/tuning.lua"

If you have mod that has items that don't have EMC values, let me know and I will add it to the list :D

Mod is fully compatible with "RoG" and "SW" DLC !

Any bug report will be appreciated, if you find any, please leave a comment below !


What's New in Version v2.9.5   See changelog

Released

  • v2.9.5:
  • - fixed the Alchemical Researcher not giving blueprints sometimes
  • - fixed an issue with items having 0 EMC value not getting removed/processed correctly
  • - fixed many other non-significant errors I found in my own 3 year old code
  • - all mod items now float on water, this prevents you from losing very valuable materials (animation is broken/missing right now, I need someone who knows how to add 'on-water' animation)
  • - added Red Matter Multitool - red matter axe, pickaxe and shovel in one tool, craftable under EE Misc tab
  • - added Knowledge Fragment drop chances to all SW DLC mobs and bosses
  • - added missing EMC values for SW DLC items
  • - more balancing of EMC values (again)
  • - I'm making this a new, SW DLC stable release, thus removing v2.8.6 from download
  • Like 2
  • Thanks 1

User Feedback

Recommended Comments



Crashed with new version when killing a fullmoon spawned graveyard ghost.

 

Pasted the releveant text from log

C:/PROGRA~2/DONTST~1/data/../mods/EE/modmain.lua:265: attempt to index field 'lootdropper' (a nil value)
LUA ERROR stack traceback:
        C:/PROGRA~2/DONTST~1/data/../mods/EE/modmain.lua(265,1) in function 'EntityKilled'
        C:/PROGRA~2/DONTST~1/data/../mods/EE/modmain.lua(269,1) in function 'fn'
        C:/PROGRA~2/DONTST~1/data/scripts/entityscript.lua(690,1) in function 'PushEvent'
        C:/PROGRA~2/DONTST~1/data/scripts/components/health.lua(245,1) in function 'SetVal'
        C:/PROGRA~2/DONTST~1/data/scripts/components/health.lua(271,1) in function 'oldhealthdelta'
        C:/PROGRA~2/DONTST~1/data/../mods/HF_Summons/modmain.lua(738,1) in function 'DoDelta'
        C:/PROGRA~2/DONTST~1/data/scripts/components/combat.lua(362,1) in function 'GetAttacked'
        C:/PROGRA~2/DONTST~1/data/scripts/components/combat.lua(753,1) in function 'DoAttack'
        C:/PROGRA~2/DONTST~1/data/scripts/stategraphs/SGwilson.lua(2139,1) in function 'fn'
        C:/PROGRA~2/DONTST~1/data/scripts/stategraph.lua(476,1) in function 'UpdateState'
        C:/PROGRA~2/DONTST~1/data/scripts/stategraph.lua(515,1) in function 'Update'
        C:/PROGRA~2/DONTST~1/data/scripts/stategraph.lua(111,1) in function 'Update'
        C:/PROGRA~2/DONTST~1/data/scripts/update.lua(127,1)
scripts/frontend.lua(723,1) SCRIPT ERROR! Showing error screen    
Force aborting...

 

ETA: Had a look at the game files, and seems that ghosts not having a lootdropper component is causing the crash. Will probably also fail on any other mod-specific mobs that don't have the lootdropper component (such as imps from "Emeralds" mod).

ETA2: Added a check for data.inst.component.lootdropper to the dropchance check, and it fixes the crash, although a better solution would be to add the lootdropper component if it doesn't exist - but I don't know if you can add the component to the prefab on the fly at that point in time (i.e at entity_death).

Link to comment
Share on other sites

Oh, I forgot to put that check... I will fix that propably tommorow, because it's 23 on my end, so...

Link to comment
Share on other sites

No worries,  I edited the code here as a band-aid fix. See above about adding the lootdropper component if that solution is feasible.

Link to comment
Share on other sites

A minimap icon for knowledge fragments would be really handy - just saying :-)

It will make the KF to easy to notice and gather...

 

The mod needs quotes for different characters - that's what should be done ;)

Link to comment
Share on other sites

So let's see if I get this right. The lighting sword, yellow version is the discharge. Do 50 damage. the red version is charge lighting sword, how can I get to the version that you show on the picture? I been hit by lighting like 20 time when my sword is red. It didn't upgrade and didn't show a percentage. 

Link to comment
Share on other sites

So let's see if I get this right. The lighting sword, yellow version is the discharge. Do 50 damage. the red version is charge lighting sword, how can I get to the version that you show on the picture? I been hit by lighting like 20 time when my sword is red. It didn't upgrade and didn't show a percentage. 

No, you almost got it right:

 

- The yellow-ish gray looking sword is the discharged one - you get it from the crafting (50 damage). In order to charge it, you must hold it in your hand and lightning must occur nearby. Then it turns into:

 

- The glowing yellow one - it's charged and it has percentage usage and it does damage base on that percentage (50-150 damage). Each lightning charges it by 200 uses (20%), If you reach 100%, it turns into:

 

- The glowing red one - it's supercharged, it has no percentage usage, does 150 damage and has ability to kill any creature with it's special lightning discharge power,

 

It's clear now?

Link to comment
Share on other sites

will you make this for DST?

 

Maybe... I don't know how to convert my mod to DST YET !, but I will certainly look into this in the future...

  • Like 1
Link to comment
Share on other sites

ye, klei changed something in mods.lua. just having shipwrecked instlled causes crash during game initialisation.

 

scripts/mods.lua(211,1) Mod: EE (Equivalent Exchange v2)      Error loading mod!
...steamapps/common/dont_starve/data/scripts/recipe.lua:72: variable 'SaveGameIndex' is not declared
LUA ERROR stack traceback:
        =[C] in function 'error'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/strict.lua(23,1)
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/recipe.lua(72,1) in function 'MergeRecipes'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/recipe.lua(95,1) in function 'GetAllRecipes'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/recipe.lua(102,1) in function 'GetRecipe'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/../mods/EE/EMCvals.lua(592,1) in function 'RecipeExist'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/../mods/EE/EMCvals.lua(662,1) in function 'fn'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/../mods/EE/use.lua(109,1) in function 'use'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/../mods/EE/modmain.lua(1076,1) in main chunk
        =[C] in function 'xpcall'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(453,1) in function 'RunInEnvironment'
    ...
        =[C] in function 'SetPersistentString'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(18,1) in function 'SavePersistentString'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(76,1)
        =[C] in function 'GetPersistentString'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(63,1) in function 'BeginStartupSequence'
        scripts/main.lua(277,1) in function 'callback'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(331,1)
        =[C] in function 'GetPersistentString'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(311,1) in function 'Load'
        scripts/main.lua(276,1) in main chunk

Link to comment
Share on other sites

Interesting... Looks like Klei messed up the "recipe.lua"... Or the shipwrecker added an item that can't be correctly processed by my "EMC values" system... Would you mind posting the EElog.txt file as well ?

  • Like 1
Link to comment
Share on other sites

not much in it....

 

Registering EMC values:
 
RoG enabled: true
Force recipes: false
Mod support: true
EMC max iterations: 5

 

there's a  thread in mods&tools mentioning the change to API recipes. Might be something useful in there...

Link to comment
Share on other sites

Ok, so I looked on the code for the shipwrecker... Looks like it's a bug in the actual shipwrecker's DLC itself... The logic of their code is right, it's just that it executes strangely (Lua is strange sometimes)... Also, I found this in their code:

local rog_enabled = true -- TODO: replace this with actual RoG check

Maybe this is a problem ? Do you have RoG enabled along with Shipwrecker DLC ?

 

Also, try verifying the game's files (if you're running Steam)

Link to comment
Share on other sites

Verified the files - still crashed.

 

you can't have both DLCs enabled simultaneously - you pick which one to use when you create the game. Either/or.

Link to comment
Share on other sites

you can't have both DLCs enabled simultaneously - you pick which one to use when you create the game. Either/or.

local rog_enabled = true -- TODO: replace this with actual RoG check

Sooo, what is this thing above used for then ?...........

 

I am really confused now...

 

All things said, it's not my fault that my mod isn't working with Shipwrecker's DLC, because everything in my code is ok - the game is simply processing 'SaveGameIndex' variable incorrectly on your computer and I don't know why... Are other user's affected by this as well ?

Link to comment
Share on other sites

i'll have a look at the code, and see what i can see.

 

i think it's the way the recipe constructor has changed in the SW build (there's an extra argument now) that is causing problems when EE reads through recipes in its initialisation. It's not like it crashes when i load a save, it dies when DS itself starts, before the main menu screen.

I think other users will have this problem...sure it's not specific to my install.

Link to comment
Share on other sites

I think the problem lies in this line:

local GetRecipe = GLOBAL.GetRecipe

It's at the top of my EMCvals.lua... This will be hard to come around...

Link to comment
Share on other sites

I think the conflict is the change to recipe.lua, which now checks to see if your save is vanilla, rog or sw, and loads/merges recipes accordingly.

 

But EE gets all the recipes before a savegame has been selected....and therefore dies.

So we need a custom recipe reader function, or to call the existing one later (i.e. once the save has been selected, not at game boot).

Link to comment
Share on other sites

So we need a custom recipe reader function...

Doable.

 

...or to call the existing one later (i.e. once the save has been selected, not at game boot).

It's not possible. The game automatically checks mod integrity before starting up, by executing all of it's code. Also does it when save is loading, but then everything would be all right (recipes merged).

  • Like 1
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...