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

Lamps and light

Hey there. I was wondering if there is a way to make the ship's lantrens give off light. That would make night sailing more interesting I think. Just an idea. If anyone has any thoughts on it, feel free to respond. Thank you.

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />
 
There was talk of this a while back, but it was too hard to complete me thinks.
 
I don't know if light sources can be added at sea.
You can add them to locations, certainly.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SendMessage(loc, "lsfff", MSG_LOCATION_ADD_LIGHT, lightName, litX, litY, litZ);<!--c2--></div><!--ec2-->
is the code.
 
Could such a bit of code be used, say... to give your character a working torch as an item, for caves and other dark places?

What sort of loc is "lsfff", by the way?
 
Check keywords.c (on the FTP) for the lowdown on what the gibberish means (basically, it's a way of telling the game what arguments will follow, i.e. l = int, f = float, s = string).
PostEvent and SendMessage both use that.
GetEventData() is used to receive those argument(s), if you're writing a function that will be called as an event.

I don't know; you certainly can _add_ those lights, but I don't know how you'd _remove_ a light.
(I.e. it'd be a torch that'd leave a trail of light everywhere you've been).

There's a number of functions that get called once/second or so, that we could piggyback that statement to.

That sendmessage above, it's actual form is:
sendmessage(ref_to_loc_to_add_the_light_to, "params_to_follow", param1, param2, param3).
 
How would you put a lantern in the characte's hand in the first place ?
Would be intersting to give such an item a light locator.
Nathan, why do you think the light stays when the item moves ?
 
Because you're not adding the light to an item, you're adding it to the location (directly, in this case, because sendmessage sends to the loaded location), with fixed coordinates.

You can't, SFAIK, put anything in a char's hand; what you could do is just have it appear attached to the shoulder or something.
 
It would be nice to have ships moored in the harbor having lights on them at night. When you're aboard ship at night in first person on the deck, there are lit lanterns... Not sure they can be "on" at night to view from port or a ship deck, tho.
 
The thought that occurs to me regarding lights on ships is that when you use the Inca object, when you are fighting the Black Pearl, one of those "teleport" lights appears on the deck of your ship, and you can also see it if you go to first person sailing mode.
This makes me think that there would be a way to add lamps to various parts of the ship, the top of the mainmast, or in the actual lamp locations in the stern. I wonder if it would involve reskinning the ship models, to take the lamps out, and determining the location where the lightable lamps would go. Hmmm...

One interesting thing along with this is that the lighthouse on Oxbay is lit at night, and you can see it from the port location, but it is not lit when you look at it from your boat. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/sailr.gif" style="vertical-align:middle" emoid=":sail" border="0" alt="sailr.gif" />
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> Just more of the mystery of the game! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />

Although that idea about the Inca object raises the question - how did they do that?

Do you know you can activate that ball for ALL of your ships? I dunno if it makes a difference, but I did it the last time I sunk the Pearl - because I COULD do it... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" /> Like I said, not sure it made a difference... It did not activate the animation on any of the other ships - and when I switched ships the ball remained on the ship I left... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Done via (it appears):
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->CreateEntity(&artifact, "artifact");

     LayerAddObject(SEA_REALIZE, &artifact, -1);<!--c2--></div><!--ec2-->

So I guess it's probably `hard-coded`, since nothing's sent to the engine but the command to create the artifact entity.

But yes, I think you probably can reuse this effect (if you wish an energy spout on your ship for some reason. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />).

The actual _gameplay_ effects from the artifact are done in that quest case; the above code is just to get the FX to appear.
 
It's not the effect of the animation, it's the effect of the artifact that I wondered if it was possible to dupe... I.E., you have four ships, you can hit the BP four times with that ball thing, (since you can command it for all four ships), and then knock it down from there... But it's not important, just musing... It does NOT need to be done, IMO...
 
The effect of the artifact is done by calling a quest case. You can create new artifacts with new effects.

In inititems.c, find item "artefact".
Copy/paste the define, and change the itm.quest entry to a new quest case (that determines what quest case to call when the item is used).

BI _should_ then add that to the perks menu automatically if the pchar is carrying the item.
 
Ah, I know it can be MODDED, and IMO the way things are at the moment are fine and do not need to be changed.

BUT... I was recently playing the game and landed at KR with 4 ships. When I encountered the BP after the temple collapse, I set the artifact to hit the BP - and it did - and then proceeded to try to chase after that speed demon in a MOW... Which was next to useless, especially with the new "`no-sail`" if you're too close mod (which generally did not bother me until THIS MOMENT, LOL!)...

SO I swapped ships with a corvette or a warship or something, whatever I had that was more nimble than the MOW, and then looked over at the original MOW and saw the artifact still on it... Hummm, I thought, I wonder if I can switch that or if it makes a difference...

So I opened up my use ability menu and there it was - the artifact. I used it for the ship I was on, and found I could set it for the other ships too - but I don't think it did anything to change my situation with the BP.

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Not that it matters, but why is it there, if it makes no difference? It surprised me that I could assign it to the other ships - via the "Give Order" menu, I could pick "Use Ability" and set the artifact for all the other ships...

It made me wonder if it did anything - because I don't think it did (the artifact is to be used only once for whole party) - and if it doesn't work, why is it there? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

Again, idle thoughts... It seemed weird that it was there but it made no effect... Is this something Akella did not have a chance to fix/finish before Disney's deadline?

Just curious... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
Nah, I mean you can create your _own_ `activatable-during`-`sea-battles` items.

So you had, by the end, four of those glowing columns of light?
 
No, just one, and it was on the original MOW... But the icon menus gave me the option of activating the artifact - and I did - but nothing happened... Just wondered why it was there, if nothing happens... Mistake? Oversight? Unfinished?

The BP is an achingly long battle to reduce it by one or two hitpoints each volley, regardless of the artifact, or if you're in a gunboat or a MOW... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Originally posted by Nathan Kell
Done via (it appears):  

code:  

CreateEntity(&artifact, "artifact");  
        LayerAddObject(SEA_REALIZE, &artifact, -1);  <!--QuoteEnd--></div><!--QuoteEEnd-->

I've been following the conversation, but to jump back a bit, <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" /> could this possibly be applied to create a new item, a lamp, that works like the artifact does, ie when you activate it the light goes on and appears on your ship. the only difference being instead of the teleport feature that appears with the artefact, you would get the lamps like in the towns and ports, or your cabin. That way you could activate the lights on your ship at night or if there is fog. I wish I had more time to play with the code.... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mad.gif" style="vertical-align:middle" emoid=":c" border="0" alt="mad.gif" />

Thanks Cap'n Archibald for making me want to stare at code again for hours and hours, and try to figure out why it doesn't do what I want it to. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Kinda similiar, I've noticed sometimes when I start via the modhelper, the room I'm in is all black, and any interior stays that way until I step outside for a spell. But even though it's all dark, the patch right in front of me is a bit lit up.. almost as if I was carrying a flashlight or something.

What would cause this, and can it be done intentionally, to make a nasty flooded dark cave that would make everyone curse me bones for putting it into a mod as they stub their toes?
 
Hey Sir Christopher, no problem. I just always found it frustrating trying to fight at night and its pitch black. Hopefully someone will have a breakthrough.

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" /> Drinks all around and more when we find the thing we seek!..
 
Back
Top