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

Rebuilding the BuildingSet

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
Hello all,

Once again, a random idea has popped up into my head. A random idea that might be a very good one. If it works, that is. As you know, there is a BuildingSet mod in the modpack made by CouchcaptainCharles. It's an excellent mod, but has several weird things in it. Most importantly, the buildings are not solid, so you can walk straight through them. This is because the buildings are handled by the game as if they were blades/guns attached to a motionless character. I had the idea to change this and make the buildings BE a motionless character instead, because there IS collision detection between two characters. I'm not sure if this would work for large objects, but it's worth a try.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><i><b>More info about how this idea would work ingame:</b></i><!--sizec--></span><!--/sizec-->
Provided that, when using my idea, the walk patch IS working properly, there are a lot of things that would need to be changed:
1) The detached sections from some buildings (like the headquarters observatory) can still be weapons, just like now, so that they can either be there or not. But because you can't walk through the building, you can't walk through the detached section either. Unless the detached section is outside the building.
2) A problem occurs for the interior, because you can't walk through the walls anymore, you can't get into the interior anymore either. What I would like is that when you "talk" to the "building", you will be teleported to the interior automatically. Then it would seem as if it is a regular locator, but it works through a dialog file. It would work a bit the same as the corpse dialog did. You don't actually see the dialog at all. Then, when you are inside, the owner would be there and you can talk with him/her normally. It would also be possible to generate the owner as second character in front of the building-character. Pluspoint of that is that the owner is animated again, like usual.

If this idea works, I reckon it can be made much less obvious that the game handles the buildings weirdly, because:
1) There is collision detection with the building (but how to prevent the building from being moved around by the player pushing it, like what happens with motionless characters?)
2) You can use the dialog file to teleport the character to an interior location (but how to teleport back to where you came from? CCC made a random locations mod that is in the modpack, but not used, that might show some useful code for this)
3) You can add a second animated normal character in front of the building-character as the owner.

To change all this, though, we would first have to test if you can actually use a building as character model, then test if there is collision detection with this "building", then see how "talking" to this "building" works.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><i><b>Test results so far:</b></i><!--sizec--></span><!--/sizec-->
Test results so far have been very poor. I have added a new motionless character to Oxbay_Port. That much worked. Then I added B_town.gm from the RESOURCE\MODELS\AMMO folder into RESOURCE\MODELS\Characters folder and changed the added character's model to "B_town". The game refused to load the scene and instead crashed to desktop. I didn't actually expect this to work, but after several attempts at making the game accept the ammo model as a character model, I am still no further in convincing the game that a keep really is a person.

So I will be needing help in converting an ammo model into a character model that the game will accept. Once that is done, we can see how it looks ingame and whether the collision detection between the building-character and the other characters works.

If you want to help, download my testfiles <a href="http://pieter.piratesahoy.org/char_buildset_test.zip" target="_blank">here</a>. <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->WARNING:<!--colorc--></span><!--/colorc--> Adding this into your game WILL crash your game as soon as you try to load to Oxbay port. As far as I know, the "B_testbuilding.gm" file will need to be changed into a .gm file type that the game will accept as character. Please try and do something with this. Inez's tool should be able to help, though I don't know how to make it work.
 
Nice idea! I hope that we could convince program to accept this.

One thing is interesting: if we get a building with door on one side, then we come on the opposite side and start talking... the building won't try to turn to face us? Of course, we could probably do a relaoad to other location very quickly, so maybe it'll be negligible. Alas, probably I'm going too far or misunderstood the idea. We should first force program to work at all and then deal accordingly.

I'm affraid I can't actively help at the moment. I don't know anything about buildings, locators etc. Besides, I'm currently very busy with adding partly your idea and partly mine into the game, that with different flags. The good news is that it seems I'm starting to win! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

I wish you luck with your project and it's a pity that currently I'm not much of help... <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

pirate_kk
 
Likewise. Whilst I'm reasonably familiar with character models, I'm not so much with buildings and ammo as yet. I've recently starting experimenting with some new additions for items/ammo so I'm starting to learn more, however as it currently stands I don't think I'd be too much help to you there Pieter.

That is good news with your flag/nations mod there, pirate_kk. Sounds interesting. Looking forward to seeing the results.

Cheers <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
The buildingset characters are just as motionless as the characters the buildings are attached to now. They won't face you when you start talking to them, just like the buildingset character in Oxbay Port won't face you when you start talking to him. But thanks for bringing that up; it could've been a really weird sight. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

I asked Inez Dias about this problem and this is what she replied:
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->to make a weapon model into a character model you'd probably have to first export it to VRML and then import it back to gm with the character checkbox checked. There's a number in the gm files that sets the type of model. You should be able to check if that's changed by the above process if you look into the View menu (View / details or something).<!--QuoteEnd--></div><!--QuoteEEnd-->
I tried that myself, but when I export the model to VRML, the program crashes and the model can't be read. When I export to X, the model is dissected into multiple parts, so I would have to figure out how to put those sections back together. With a bit of luck, I will have some success eventually though. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Great news with the flags mod, Pirate_KK. Looking forward to it. It'll be excellent. Great that you are winning the battle. I had been afraid it wouldn't work, so major congratulations to you! <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
<!--quoteo(post=148687:date=May 17 2006, 08:33 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ May 17 2006, 08:33 PM) [snapback]148687[/snapback]</div><div class='quotemain'><!--quotec-->

2) You can use the dialog file to teleport the character to an interior location <b><u>(but how to teleport back to where you came from?</u></b> CCC made a random locations mod that is in the modpack, but not used, that might show some useful code for this)

<!--QuoteEnd--></div><!--QuoteEEnd-->
that could be handled as a dialoge on the owner maybe?

Like I have said elsewhere I cant help with models. However maybe it has to do with the fact that they dont have any sword/gun locators?
 
About leaving the building after being teleported in, can't that be handeled the same way as when you accept or come to a certain point in a mission (like when you and Danielle go to the governer's house) you are then teleported to a certain place. That mission puts you back at a spisiffic location at Lighthouse I think.

There could be a "we're done" dialog option when you're finnish that would set you back to the board where the building is.
 
It's not the teleporting that is the problem. I reckon that can even be done using the exit locator from the inside location. The problem is to teleport you back to the exact same place you came from. Usually, you are teleported to a locator, but there is no locator in front of a building you built yourself, so where should you teleport to? Making a teleport to the location with the building is quite possible, but it's a bit odd when you enter a house you built, then, when you leave, you appear on the other side of the location. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />

I added the required locators to the ammo-building before using it as character, so there were gun/blade locators. The problem is what Inez Dias describes: "There's a number in the gm files that sets the type of model." So we should find some way to get that number to be correct for a character model.
 
Pieter, I don't know if you know this, but the BOX model from CCC's buildingset is already exactly as you are describing. It is a person using the box model. You can talk to the box, and it has collision detection and can be pushed around like a person.

Could anyone tell me how CCC did that?
 
<!--quoteo(post=163928:date=Sep 26 2006, 07:31 AM:name=Mr Mistophelees)--><div class='quotetop'>QUOTE(Mr Mistophelees @ Sep 26 2006, 07:31 AM) [snapback]163928[/snapback]</div><div class='quotemain'><!--quotec-->
Pieter, I don't know if you know this, but the BOX model from CCC's buildingset is already exactly as you are describing. It is a person using the box model. You can talk to the box, and it has collision detection and can be pushed around like a person.

Could anyone tell me how CCC did that?
<!--QuoteEnd--></div><!--QuoteEEnd-->


I don't think so. I'd rather say, that the character, to wich the box is attached to is invisble. There are many buildingmodels attached to invisible characters.
 
I think Captain Benedickt is correct here. I have once checked the MODELS\Characters folder and the box model is not in there. It IS in the MODELS\AMMO folder instead, so the box works just the same as all the other BuildingSet models. All BuildingSet models do have the collision detection of the characters they are attached to. However, most buildings are much larger than these characters. The box is about the same size as the character, so the box does appear to work right.
 
I see.... what a tricky trick that was! <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid=":razz" border="0" alt="razz.gif" />
 
Ummm, It's more primitive messing than a tricky trick: the b_invisible character uses Akella's lizard model. So it's not even invisible but only hidden by the box <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

IIRC using other models than characters or animals crashed the game when I tried to employ them as building "characters" (maybe due to the lack of bonestructure and/or animation)
 
I had the exact same problem. Shame. Could make it work much better. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Maybe time to bump a little, any chance this will be in the build 14? Or maybe it's already there, and I haven't seen it..
It's a amazing mod, and a real PITA it doesn't work perfect, the idea is brilliant and adds a whole new dimension to the game!
 
I seems that my above suggestion simply doesn't work. No more work is being done on it and I don't have the time anymore to try it either.
 
<!--quoteo(post=192108:date=Apr 29 2007, 12:04 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Apr 29 2007, 12:04 PM) [snapback]192108[/snapback]</div><div class='quotemain'><!--quotec-->I seems that my above suggestion simply doesn't work. No more work is being done on it and I don't have the time anymore to try it either.<!--QuoteEnd--></div><!--QuoteEEnd-->Well, that's a pity. I can only say that I believe this thing should be one of the major features of the builds.
However I have very limited programming skills, and not enough time to start experimenting with modding, so this is not a complain, just a question out of curiosity from somebody who's spoiled with such a nice mod. I only play the game now and then, and bought it only because I knew there was a great mod for it. Keep up the good work, and thank you very much for making it available to people who do not give anything for it in return. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Edit: have a nice queensday Pieter!
 
It seems we might have another chance at this!
Jack Rackham wrote:<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->I have used the method of adding it as a randitem. This causes no problems with lighting files. Also you can finetune the position very exactly (difficult in the TOOL). Be sure to make the radius of the randitem = 0.0001 or so.<!--QuoteEnd--></div><!--QuoteEEnd-->
We can add locators through code as far as I'm aware, so that means we could maybe rewrite the BuildingSet code to use items instead of items attached to characters.
That should solve the lighting problem, as well as the need for having stationary characters to attach them to.
Might be worth experimenting with, you don't think? <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
But can we add them freely or not? And we still have the collision problem? BUT we don't have those ugly lighting in the night <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
 
What do you mean by "can we add them freely or not"? If you're worried about the requirement of locators, I cannot answer that question yet.
I know Maximus added some campfire locators at the QC port location through code, rather than in the actual model. So that sounds hopeful.
I just don't know if that can only be done during the location initializing or if it can be done "on the fly". Eg. when building in the game.

One problem I can already anticipate is the dialog required for the buildings you build. After all, you can't talk with an item.
So we'd then probably have to add the building and character seperately. That might make it a bit more complicated. But not impossible.

The "item" option apparently does solve the lighting problem and also elimates the need for the unmoving characters "supporting" the buildings.
It won't solve the collision detection problem though, but I don't think that can be done in the first place. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />

For now I will be happy if we can replace the current BuildingSet buildings in the various locations with versions that do respond properly to lighting.
For whatever reason, on my old computer, the BuildingSet models' lighting looked fine, but not anymore.
 
Back
Top