No encumbrance Mod

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
dharthoorn
Low Yeek
Posts: 5
Joined: Sun Feb 17, 2013 4:57 pm

No encumbrance Mod

#1 Post by dharthoorn »

Right, this encumbrance thing does absolutely nothing for me except annoy the hell out of me so I fixed it by modifying the Actor.lua file like so:

function _M:getMaxEncumbrance()
local add = 0
return math.floor(40 + self:getStr() * 1.8 + (self.max_encumber or 0) + add)
end

to

function _M:getMaxEncumbrance()
local add = 0
return math.floor(40 + self:getStr() * 25 + (self.max_encumber or 0) + add)
end That solves it for me but of course I wanted to make a "proper" mod and that's what's not working. I'm probably making some noob mistake so please...educate me.

What I did;
What I understood from Darkgod's wise words (http://te4.org/wiki/addons) I wish to superload the file Actor.lua so I put that in Superload/Mod/Class folder. In the file actor.lua file I put;
local _M = loadPrevious(...)

function _M:getMaxEncumbrance()
local add = 0
return math.floor(40 + self:getStr() * 25 + (self.max_encumber or 0) + add)
end

return _M Then I set superload to "true" in the init. Compressed the folder with 7zip, modified the extension to .teaa launched the game. Problem is that it does "see" my mod but labels it as "incompatible". I can force enable it but it doesnt work anyway. So...-sigh-...what am I missing?

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: No encumbrance Mod

#2 Post by lukep »

Don't compress the folder, compress the files that are in the folder.

You may also need some requirements for this, but that's not the current issue. (look at the lines at the top of most files, that say require... or local actor = ...)
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

dharthoorn
Low Yeek
Posts: 5
Joined: Sun Feb 17, 2013 4:57 pm

Re: No encumbrance Mod

#3 Post by dharthoorn »

Thanks for your response. Compress individual files instead of the folder? What you are saying does not make any sense to me -at all.

I'm using the example .teaa mod file made by Darkgod which is using regular zip compression. This folder structure in this file is compressed as a whole. I have decompressed it, added/deleted what I thought was necessary and re-compressed it. Compression-wise what did I do wrong here please explain in detail.

As for the code I'm sure I made a mistake, otherwise it would have worked.

As I said, for the moment I just modded the master .team file but a side effect is that it doesn't recognize my game version anymore (fails version crc check obviously) which is not a big deal for me at all, but still.

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: No encumbrance Mod

#4 Post by lukep »

So your file structure looks like: tome-noencumber.teaa/tome-noencumber/init.lua? The init.lua file shouldn't be in a folder in the .zip, it should be on the first level of it.

Maybe the simplest way would be for you to attach a copy of your addon.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

dharthoorn
Low Yeek
Posts: 5
Joined: Sun Feb 17, 2013 4:57 pm

Re: No encumbrance Mod

#5 Post by dharthoorn »

Mwahaa no I'm not THAT noob! The file path is ok the ini being in the root. I knew that, because if my structure was off, my addon wouldnt have showed up as selectable (albeit incompatible) in game with the ini lacking and all.

No, I'm pretty sure the pb is the code... aamof I rage-deleted the mod actually. It looked pretty much as I described it code/structure wise bit in any case I can re-assemble it fairly easy and upload it.

Post Reply