Jump to content

Modding Meld


wghost81

Recommended Posts

Updated the mod.

 

Added +1 Meld (adjustable) for each Alien Food, Stasis Tank and Surgery.

 

CollectArtifactsFromDeadAliens clearly needs to be rewritten. I realized, that killed Outsiders do not leave the body, thus no meld can be recovered. Also, not everyone like the idea of dissecting human (EXALT) bodies. So yes, I will need to rewrite those crazy jumps again. :smile:

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

<..>

I think increasing meld for big/cybernetics aliens will make early game harder and mid-to-late game easier, as there are more aliens and more big aliens. And that's not what I want.

My original idea was to extract meld only from cybernetic and robotic aliens, not from all, as I want to shift meld to later use in game; imho, Outsider should not leave any body behind, it is logical from story perspective (as he "pulled disappearing act" after all).

Edited by Tycus
Link to comment
Share on other sites

My original idea was to extract meld only from cybernetic and robotic aliens, not from all, as I want to shift meld to later use in game.

This idea requires total meld-related tech re-balance. Especially MECs, as their starting variants are useful in first two months only.

 

Right now I'm trying to "squeeze" the original function to see if I can add cases for all existing aliens. If I can, it will be easy to adjust meld values to anyone likings.

Edited by wghost81
Link to comment
Share on other sites

<..>

This idea requires total meld-related tech re-balance. Especially MECs, as their starting variants are useful in first two months only.

That is obvious, since I already have made rebalance to all classes in game for my mod (now just waiting for updated Extended Perk Tree mod to put back those changes in EW), and MECs will be getting buffed, don't worry; also meld-related research and unlocks will be changed and shifted around research tree.

 

<..>

Right now I'm trying to "squeeze" the original function to see if I can add cases for all existing aliens. If I can, it will be easy to adjust meld values to anyone likings.

Nice to hear. I hope there is place at least for some (six will be enough for me :wink:).

Link to comment
Share on other sites

I was able to add cases for all aliens (except outsider and zombie, because they don't generate a corpse, and EXALT). Code seems to work properly, I tested it on two UFO missions (small scout and abductor) using existing saves (yes, that's the main reason why I played EW on Impossible without Ironman mode on — to make those saves :smile: ). But, UE Explorer doesn't want to decompile it right. I double-checked all offsets, everything seems OK, but this still worries me. Am I missing something? Can someone check the code before I release it for everyone? Amineri, could you, please?

 

I added the code to misc section of mod files: http://xcom.nexusmods.com/mods/431 (N++ made quite a mess of spaces and tabs :smile: ) Original part with if-goto-if-goto doesn't decompile right (checking alien/exalt items), but it's OK. Switch section worries me the most.

Edited by wghost81
Link to comment
Share on other sites

I gave it a quick lookover but I don't know exactly what you mean by "not decompiling right" ^.^

 

One issue that I've noted is that UE Explorer doesn't properly terminate switch/case statements that don't include a break; statement after the default case. Leaving it out is valid, and the scope of the switch/case should be determined by preceding break; statements, but I can understand that handling that is tricky.

 

So, I typically add a break statement after the default case just to make the UE Explorer decompile a little nicer looking (unless of course those extra 3 bytes make me go over the limit).

Link to comment
Share on other sites

Thanks, Amineri. Yes, I was talking about kDesc.m_kDropShipCargoInfo.m_arrArtifacts[164] += iSlot getting inside "default" case of the switch statement. Sorry, sometimes I can't make myself clear. :smile: Never seen this before, as other similar functions decompile correctly.
Link to comment
Share on other sites

There is another case under which UE Explorer will decompile with correct switch/case nesting : if the switch/case is wrapped in an if statement.

 

So:

if(snafu)
{
    switch(foo)
    {
        case bar1:
           break;
        case default:
    }
}

will decompile with correct nesting.

 

Also

switch(foo)
{
    case bar1:
       break;
    case default:
        break;
}

will decompile with correct nesting.

 

However:

switch(foo)
{
    case bar1:
       break;
    case default: 
}
<more code>

will decompile as:

switch(foo)
{
    case bar1:
       break;
    case default: 
       <more code>

The code still executes correctly. It's just a decompiler nesting display issue.

Link to comment
Share on other sites

Thanks again!

 

I've uploaded v3 of the mod (changed mod name to more appropriate). It allows fine-tuning of meld recovered to play your own style or to use in you own mod(s).

 

I think, I'll stop spamming new versions for now and move to EXALT or some other things which disturb me in EW. :smile:

Link to comment
Share on other sites

wghost81 - Love this idea and mod.

 

By chance do you know if Xcom modding supports numbers less than 1, like .10(I assume yes, but you never know sometimes).

For example if I change this part.

 

UPK_FILE=XComGame.upk
OFFSET=10565863
[MODDED_HEX]
{ This is Meld amount per Sectoid. Change 01 to whatever value you like (hex-value). }
0.1999999999999a

 

Will I get 1 meld for every 10 Sectoid's I kill?

I'm trying to balance my game around marathon , and make MEC/Genemods come out a lot further in my campaign.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...