• 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!

Solved The Building Set for PotC

<!--quoteo(post=167934:date=Oct 17 2006, 10:03 AM:name=Thomas the Terror)--><div class='quotetop'>QUOTE(Thomas the Terror @ Oct 17 2006, 10:03 AM) [snapback]167934[/snapback]</div><div class='quotemain'><!--quotec-->
I have an idea, which COULD improve the buildingset a little bit, (this is not to complain!) i think it is a shame you can`t do something with the stronghold. maybe you could put the character where the stronghold is attached to in front of it, and give him a dialog which should teleport you to the inside of (for example) fort model 3, the courtyard, there you could place soldiers, and maybe even set a blacksmith there.
<!--QuoteEnd--></div><!--QuoteEEnd-->


The fort model 2 sound better, the one with the stairs. But firs of all, the outside of the stronghold should be changed. The colour at least. It looks like a large darkgrey cube from long distance. The tower at least looks much better.
 
Can somebody using the current Beta 7 please check if the BuildingSet mod seems to work properly or not?

I have just uploaded a new Beta 7 version including some additional fixes, but the BuildingSet mod is turned off in this version, so if you want to test this, DON'T get the new Beta 7 yet.
 
I found mistakes in BuildingSet dialogs (shame on me):

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
    string buildingstr = XI_ConvertString(NPChar.equip.blade);
    aref buildingref;
    Items_FindItem(buildingstr,&buildingref);

    string interiorstr = XI_ConvertString("BS"+"simple furniture");
    if(CheckAttribute(Npchar,"equip.gun"))
    {
    interiorstr = XI_ConvertString("BS"+NPChar.equip.gun);
    aref interiorref;
    Items_FindItem(interiorstr,&interiorref);
    }
<!--c2--></div><!--ec2-->

Must be:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
    string buildingstr = XI_ConvertString(NPChar.equip.blade);
    aref buildingref;
    Items_FindItem(NPChar.equip.blade,&buildingref);

    string interiorstr = XI_ConvertString("BS"+"simple furniture");
    if(CheckAttribute(Npchar,"equip.gun"))
    {
    interiorstr = XI_ConvertString("BS"+NPChar.equip.gun);
    aref interiorref;
    Items_FindItem(NPChar.equip.gun,&interiorref);
    }
<!--c2--></div><!--ec2-->

Also "\n" in b_farm.h - they must be deleted. This is all my changes, which may cause problems
 
Are you sure? So who introduced these bugs:
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->All quoted from the bugtracker:
-----------------------------------------------
Well, actually it didn't take long to find that "no settlers deducted from crew" bug.
It is so blatant that I wonder why it has been introduced in the first place.
In my original version the settlers were deducted from the crew in
Dialogs\Enc_Officer_dialog.c, after the "Build this now" dialog exit:

DialogExit();

.....
// take buildingresources
......
Pchar.Ship.crew.quantity =

sti(Pchar.Ship.crew.quantity) -crew;

That worked fine. But Maximus obviously didn't agree, cause he he changed that line to
this:

// take buildingresources
....
ourCrew = sti(ourCrew) -crew;// MAXIMUS 08.10.2006

ourCrew is a variable that Maximus introduced on top of Enc_Officer_dialog.c. It is
nothing but a placeholder for Pchar.Ship.crew.quantity:

if(CheckAttribute(PChar,"ship.crew.quantity")) ourCrew =
makeint(PChar.ship.crew.quantity);
else ourCrew = 0;
// MAXIMUS 08.10.2006 <==

But it is a variable that exist only within Enc_Officer_dialog.c . So changing it
ALONE and closing the dialog doesn't change the playercrew at all. A

Pchar.Ship.crew.quantity = sti(ourCrew);

at the end would have done the trick. But what is the point of replacing a single,
simple line of code with two others that include a variable declared and computed
several pages above?
----------------------------------

I did a few short tests of the buildingset, and I must say that the settlement feature
is totally messed up: not one dialog I tested still works as it once did. The
secretary in your mansion doesn't have the dialognodes that open the diplomatic and
trade functions, so the whole building is useless.

----------------------------------------------

If you talk to your house tenant he says such interesting things like "Text of the
player dialogoption link.l1 which ends the dialog." or "DLG_TEXT[11]" or "Overwrite
this with the dialogtext of the NPC." Have a look at dialogs\English\b_house.h, and
you will surely realize why. (That isn't sloppy work anymore, that amounts to outright
sabotage)
<!--QuoteEnd--></div><!--QuoteEEnd-->

Could the reason be that you test only the RUSSIAN versions, or that your codebase is
different ? For example, have you ever tried to talk to the occupant of a buildingset
"house"? (YOUR version, before Beta8) Could you post a screenshot of how that looks on your computer?

I don't want to blame you in person, cause I don't really know how you work and how
Pieter compiles what you do. But I want to find the pattern that causes bugs in my old
mods after they have been "localized", and I want to break that pattern. Cause I'm
sick of the fact that all my moddingtime is spent with restoring old stuff, while
other people enjoy themselves with their new happy go lucky mods.
 
<!--quoteo(post=173171:date=Nov 24 2006, 09:45 AM:name=CouchcaptainCharles)--><div class='quotetop'>QUOTE(CouchcaptainCharles @ Nov 24 2006, 09:45 AM) [snapback]173171[/snapback]</div><div class='quotemain'><!--quotec-->
<!--quoteo(post=173110:date=Nov 23 2006, 08:15 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Nov 23 2006, 08:15 PM) [snapback]173110[/snapback]</div><div class='quotemain'><!--quotec-->
It can be easily re-enabled though so you can use the mod still, but please consider it in test-phase. Find this code:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->/* ccc Nov 06   Settlement feature disabled for the time being
// changed by MAXIMUS [abordage MOD] -->
            // ccc building kit
            if(!bSeaActive && ENABLE_BUILDINGSET)
            {
                Link.l5 = DLG_TEXT[161];
                Link.l5.go = "building";
            }
// changed by MAXIMUS [abordage MOD] -->
*/<!--c2--></div><!--ec2-->Remove the first line (beginning with /*) and remove the */ at the end.
<!--QuoteEnd--></div><!--QuoteEEnd-->
That will allow you to erect buildings, but the buildings won't perform all their services and functions like producing goods etc. (Result of a sloppy attempt to localize my dialogs )

Next week I'll start to write a package that will restore the old dialogs. That pack can be installed ON TOP of the current Build13, so there will be no need to install B13 again for the settlement stuff.
<!--QuoteEnd--></div><!--QuoteEEnd-->
 
Attached to this post
<a href="http://swankyplace.com/potcbugs/view.php?id=311" target="_blank">http://swankyplace.com/potcbugs/view.php?id=311</a>
is a filepack that fixes the messy localized Buildingset dialogs that were in B13. Simply unzip it into your PotC folder.

Instead of spending weeks with fixing and testing the new files I restored my original all-English dialogfiles.
Some changes were necessary cause the localization project has changed the structure of PotC for good :
Upon loading a "x-dialog.c" codefile the program now automatically includes a "x-dialog.h" text array file from the dialogs\english subfolder(or from the Russian folder if you use that language).
There the dialogtext is supposed to be.

However, I prefer to have code AND plain text in one file, for 3 reasons:
-It is much easier to write
-You have much less bugs with not matching texts
-It is much easier to read and understand the file for debuggers and people who would like to change it
The last point is especially important for me cause the Buildingset is supposed to be a tool for people who want to start modding.
That's why I stick to the original "code plus English text" dialogfiles.

As a concession to the localization project I put these files NOT into the \dialogs rootfolder but into the \dialogs\English subfolder.
So if you want to translate this dialog you can simply copy the "code plus English text" into the subfolder for your language and translate the English text there.

I hope that this is a good author / translator compromise <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

BTW, I don't want to be a holier than thou hypocrite: while testing the dialogs during the last two weeks I also found a bunch of bugs that nobody but me had caused <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
 
Thanks a LOT, CCC! I'll add it to the next Build 14 Alpha pack and also to a possible next Build 13 Update! <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />
 
Anyone remember this tremendously fun mod? For the sake of my li'l brother, I found myself playing around with it again and ran into some slight issues, which I have now fixed.
Most notably:
- When demolishing buildings, they don't disappear until AFTER a location reload ==> They disappear properly now!
- With Auto Loot ON, you get the "building permit" allowing you to equip a building yourself ==> No more!
 
Also: I changed the "remove buildings from Speightstown port" code. Rather than ALWAYS disappearing after going to the worldmap for the first time in the Standard storyline only,
they will now only disappear if you talk to that li'l shipyard workshop in the port and mention that earthquake. But it'll work in ALL storylines now.
So if you don't like them, you can now get rid of them. But if you DO like them, they'll stay in the Standard storyline as well.
 
Back
Top