• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fixed Problems with contraband not being detected right

I have the 3.3 exe but my Dropbox is still under DOS attack by MK, so it can not be used.
 
While silly, this isn't a game-breaking issue. I'm sure @Levis will tackle it as soon as he can.
 
Found the problem. Expect it to be fixed somewhere next week. Need to think over it a bit what the best way to fix it is.
The problem lies in that the shop and the island both have contraband and import and export set. So I need to see which one I'm actually gonna use and make sure they are used everywhere.
 
Shops are town specific. Islands are not.
To prevent weird stuff between different towns having different import export contraband goods, perhaps using it per Island makes the most sense?
 
at the start of the game the shops are now set conform the island settings. Probably because someone wanted to make it dynamic lateron. but the tradebook etc still use the island specific import and export etc. and with my previous attempt on the dynamic economy we saw already the things should be island depended or it would result in to many exploids.
 
I remember this happening back a while and thought it was fixed, but it just happened gain.

I went smuggling silk at Puerto Rico and all went well until it came to transferring goods. I got the money and kept the silk! I have had no issues with smuggling before in this game.
 
I remember this happening back a while and thought it was fixed, but it just happened gain.
It hasn't been changed at all from before. @Levis needs to do some further tweaking of his code for that.

If need be, I'll eventually look at it. But I'd rather avoid having to do that....
 
These issues won't go away until somebody works on it.
I probably won't look into it until I've done a whole bunch of other things first.
Ideally Levis should do this; it is his mod, after all.
 
in 2 weeks there is a fix for this.
Sorry I took that long guys.
Maybe sooner if I cant focus on studying :p
 
So I think this should fix it.
I can't test it yet cause my game is still installing. But go to CharacterUtilite.c and find the function FindFirstContrabandGoods and the one after it. Replace these by this:
Code:
int FindFirstContrabandGoods(ref _refCharacter)
{
    int i;
    /*int curStoreIdx = GetCharacterCurrentStore(_refCharacter);
    if(curStoreIdx>=0)
    {
        _refCharacter.FindContrabandGoods.StoreIdx = curStoreIdx;
        for(i=0; i<GOODS_QUANTITY; i++)
        {
            if( GetStoreGoodsType(&Stores[curStoreIdx],i) == TRADE_TYPE_CONTRABAND_NAME )
            {
                if( GetSquadronGoods(_refCharacter,i)>0 )
                {
                    _refCharacter.FindContrabandGoods.GoodsIdx = i;
                    return i;
                }
            }
        }
        DeleteAttribute(_refCharacter,"FindContrabandGoods");
        return -1;
    }*/
    int curLocIdx = FindLocation(_refCharacter.location);
    if(curLocIdx<0) return -1;
    int curIslandIdx = GetIslandIdxByLocationIdx(curLocIdx);
    if(curIslandIdx<0) return -1;
    aref islRef; makearef(islRef,Islands[curIslandIdx].Trade.Contraband);
    int n;
    for(i=0;i<GetAttributesNum(islRef);i++)
    {
        n = sti(GetAttributeValue(GetAttributeN(islRef,0)));
        if( GetSquadronGoods(_refCharacter,n)>0 )
        {
            _refCharacter.FindContrabandGoods.IslandIdx = curIslandIdx;
            _refCharacter.FindContrabandGoods.GoodsIdx = i;
            return n;
        }
    }
    return -1;
}

int FindNextContrabandGoods(ref _refCharacter)
{
    int i,n;
    /*if(CheckAttribute(_refCharacter,"FindContrabandGoods.StoreIdx"))
    {
        if(CheckAttribute(_refCharacter,"FindContrabandGoods.GoodsIdx"))
        {
            int curStoreIdx = sti(_refCharacter.FindContrabandGoods.StoreIdx);
            if(curStoreIdx>=0)
            {
                for(i=sti(_refCharacter.FindContrabandGoods.GoodsIdx)+1; i<GOODS_QUANTITY; i++)
                {
                    if( GetStoreGoodsType(&Stores[curStoreIdx],i) == TRADE_TYPE_CONTRABAND_NAME )
                    {
                        if( GetSquadronGoods(_refCharacter,i)>0 )
                        {
                            _refCharacter.FindContrabandGoods.GoodsIdx = i;
                            return i;
                        }
                    }
                }
            }
        }
    }
    else
    {*/
        if(CheckAttribute(_refCharacter,"FindContrabandGoods.IslandIdx"))
        {
            if(CheckAttribute(_refCharacter,"FindContrabandGoods.GoodsIdx"))
            {
                int curIslandIdx = sti(_refCharacter.FindContrabandGoods.IslandIdx);
                if(curIslandIdx>=0)
                {
                    int curGoodsNum = sti(_refCharacter.FindContrabandGoods.GoodsIdx) + 1;
                    aref islRef; makearef(islRef,Islands[curIslandIdx].Trade.Contraband);
                    for(i=curGoodsNum; i<GetAttributesNum(islRef); i++)
                    {
                        n = GetAttributeValue(GetAttributeN(islRef,i));
                        if( GetSquadronGoods(_refCharacter,n)>0 )
                        {
                            _refCharacter.FindContrabandGoods.GoodsIdx = i;
                            return n;
                        }
                    }
                }
            }
        }
    //}
    DeleteAttribute(_refCharacter,"FindContrabandGoods");
    return -1;
}
I only commented a few pieces out so it should now only check island contraband and not shop contraband.

Tomorrow I can probably upload files which are tested by my self but if someone wants to go ahead and test it for me. Please.
 
Note this should only fix it for the smugglers.
If i read the code right the shop will still mistake new contrabands goods.
 
Fixed a bit more and added some prework.
Smugglers now Like or Dislike you. If you do them harm you will first have to pay the agent in the tavern before you can smuggle again.
Also you need to have some experience with smuggling before you can do the Tomas O'reily smuggling quest. But beware on this quest you will piss off the smugglers so if you like the smugglers I advice you not to do the quest unless you are willing to pay afterwards ;).
 

Attachments

  • SMUGGLING_FIX3.zip
    108 KB · Views: 114
Fixed a bit more and added some prework.
Smugglers now Like or Dislike you. If you do them harm you will first have to pay the agent in the tavern before you can smuggle again.
Also you need to have some experience with smuggling before you can do the Tomas O'reily smuggling quest. But beware on this quest you will piss off the smugglers so if you like the smugglers I advice you not to do the quest unless you are willing to pay afterwards ;).
Making things ever more involved, are you? :cheeky
I definitely like the idea of double-crossing the smugglers having a consequence as well. Certainly makes sense!

@Hylie Pistof, you're our resident smuggler; do you have any thoughts on these updates?
 
No opinion. Double crossing my business partners is bad for business so I never do it.

The Thomas O'Reilly side quest really only works early in the game and it gets troublesome anyway so I don't do that one either.
 
Back
Top