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

Sneaky Trader mod help, please...

"when I understand `trader-specific` shop code"

Heh. I'd better write it fast so you _have_ something to understand. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/type_1.gif" style="vertical-align:middle" emoid=":nk" border="0" alt="type_1.gif" />

Looking forward to another craz--err, _very neat_, Alan Smithee item/shop/shopkeeper mod! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />
 
<!--`QuoteBegin-NathanKell`+--><div class='quotetop'>QUOTE(NathanKell)</div><div class='quotemain'><!--QuoteEBegin-->Looking forward to another craz--err, _very neat_, Alan Smithee item/shop/shopkeeper mod!  :onya[/quote] <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" /> Me too, the curio shop should be great, I've been hoping to see more of that, myself.

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> So many mods, so little time! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/diomed.gif" style="vertical-align:middle" emoid=":dio" border="0" alt="diomed.gif" />

I am back home now, but seem to be suddenly swamped with work and other things... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":blah:" border="0" alt="tongue.gif" />
 
No hurry at all; I've had literally no modding or playing time lately. And before I release the shop I'd like to try and `work-in` the seperate model elements as integral to the main, instead of placed there with code. It just feels more concrete that way. But then I have to get the .col thing with Inez' tool working right.

Some dialog (random enemy generation) and temporary model elements I need to figure out too. Like, I have an idea of how I could make the decour in his shop looka little bit different each time you come in, so long as you've talked with him and chosen certain dialog options... but I'd like to be able to create a single monkey, a barrel of monkeys and a zombie attacking you in his shop, as random dialog options. But the game won't let me paste into Quentin's dialog a modified version of the `robbers-in`-`a-home` code more than once; then it crashes and pesters me about repeated code.
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->But then I have to get the .col thing with Inez' tool working right.<!--QuoteEnd--></div><!--QuoteEEnd-->
The way my col file creation works currently, you'll not get any good results with it - so I guess it's better you stick with the way you're doing it now - actually that's quite a good workaround for the col problem.
I had a hint from a russian modder that maya can export lighting into image files - if anyone could tell me more about that, I'd try to figure out how to create col files from images.
 
You just make a separate grayscale texture page ("lightmap") for every surface, with 0 = shadow and 255 = light.
You can paint it by hand if you need to, but usually you run a radiosity routine to autogenerate it.

Err, that's lightmaps. You said the light is handled via vertex color? It works the same, just way lower res. If you open a model in max and add the vertex paint modifier, and paint in just grayscale, that's what you'll be doing.
I believe Max 5 and above has a radiosity routine that can export to either lightmaps or vertex color channel.

Hmm. I guess what you'd need to do (since you have max) is to generate an ascii max scene def from the GM and from the COL, open in max, paint the new objects, and export again as ascii, then translate via tool.

Wait--does VRML support vertex colors?
 
Painting a vertex colors by hand doesn't sound like something you get right in a lifetime, but I'll try it out. My max version is unfortunately older than 5.
Anyway, thx for explaining this - I see it much clearer now - and for giving me the correct technical terms so I can do some research of my own. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/bookish.gif" style="vertical-align:middle" emoid=":mm" border="0" alt="bookish.gif" />
 
Well, glad I made sense; I've done very little with radiosity, other than `ooh-ing` and `aah-ing` at its magic. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

If you want to cheat, you can use a game level designer to do your radiosity. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />
Though I can't recall the last FPS that used vertex lighting rather than lightmaps. Q3A had the choice between them, so maybe the Q3A module for gmax will do it.

Or send the file to me and I'll export it.

The question is, what file export will store vertex colors in a way you can parse?

Heh--here's an idea. Can you write a tool that will map an object with a map, and find the average gray value of that map over a vertex?
Probably best to take the area sum of the lightness values of all texels from that vertex point out to halfway between it and the next vertex for all surrounding vertices...maybe weight the average so values closer to the vertex count more?

That way you could convert between lightmaps and vertex lighting.

I know that Brazil was free for a while, it's a radiosity package for max; you may want to see if there's an old version floating around.

My recollection is that there's a `built-in` tutorial on vertex painting (even specifically for lighting!); I can't remember what max version you have though, nor which version was first to have the tut. I'll see what I can dig up, and, if you don't have it, I'll email over the help file.
 
Wonderful. "The Assign Vertex Color Utility and the Vertex Paint modifiers have been completely rewritten for 3ds max 6."
Let me see if I still have my max4 help file.
Yup, still got it, and it's the tutorial I remember. It's the Tutorial chm, in Games Production->Tutorial 15 Modeling: Level Design->Adding a Streetlamp via XRefs. It continues in the next heading, Vertex Color (but it _starts_ at the end of Streetlamp...weird).

Do you have on the Utilities panel (go to more) something called "Assign Vertex Colors"? If so, then the tut will work for you. (It `auto-assigns` vertex colors based on light sources and their light/shadows).

Now, in Max 4 and earlier, it won't be _radiosity_, but you can fake that with some ambient lighting for the interior, and a skydome (or, `quick-n`-dirty, ambient + 1 direct sunlight) for exterior.
I can't recall which skydome script I used back in Max 4, but I believe I got it from Bobo's script world and I can probably find it and send it to you. It worked pretty well for fake outside radiosity.
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Heh--here's an idea. Can you write a tool that will map an object with a map, and find the average gray value of that map over a vertex?  <!--QuoteEnd--></div><!--QuoteEEnd-->
That's what I also thought, last night before I fell asleep. Haven't tried max yet, but doing it with a `self-written` program would also have the advantage that everyone can do it, no matter if they have any expensive modeler or not.
From you and Cat I learned what texture unwarpping is, and I want to do that some time anyway - then you could paint a lightmap on the unwrapped texture, and from that by some averaging process get the vertex colors.

But still, Alan, this will take a while, please don't wait for it with the
curio shop, I've wanted to see it for so long. We can always add better lighting a a later time.
 
Heh... This topic has gone FAR astray... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

But... Something has been tickling the back of my head for quite some time now - you know when you're in the cavern behind the waterfall on Douwesen? When you're in there, the rocks look somehow transparent and crystalized, and well, just really neat! How in the HECK is that done?

Is that somehow tied into this LIGHT thing you're talking about? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/bookish.gif" style="vertical-align:middle" emoid=":mm" border="0" alt="bookish.gif" />
 
I suspect it's a graphic effect, like lamps lit at night. The cave and the waterfall outside have like dozens of different model elements... even the puddle in the middle of the cavern (which has random drops falling into it - how?! I think I saw a location environment command for it once, but still... mystifying) is a model, but without floor boundaries - that's how you can walk right through it.
 
Ah... Interesting! I often wondered about that. They should have done that for the waterfall pool, too, so we can swim in it! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

That crystaline rock effect is really cool... I wonder if you could do something like that for your curio shop items, make some of them glow like that? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" />
 
ExecuteTechnique(), and the techniques in the ModulesTechniques folder.
They're pixel shader effects, so you need a card with PS1.0 or above support (Geforce3 or above, Radeon 8500 or above) to have them work/be visible.
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" /> Ah HA! Interesting... It would make a very cool effect, even if only to place a pitcher of ale on the table in a tavern and have it "effervesce" as it sits there! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.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" />
 
Right, I tried the location effect from the waterfall indoors once, to make the opium den smokey. It worked, except that it made everything that wasn't floor, wall or ceiling invisible...
 
Alan: Why don't you just create some particle systems? With pretty transparent particles...
There's a way to create a persistant one (rather than the timed ones from CreateParticle), IIRC, because locations do it on startup sometimes (for chimney steam, for example).
 
Look at what CCC has done with his weapons like the stink bomb... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.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" />
 
I tried to create my own particle thingy once... I started by just changing the graphic for an existing particle, but that was crap.

(While we're redoing fighting, can we have a `toggle-able` blood splatter effect? I continue to be convinced it was something Akella intended, since there's a little graphic for a blood splatter, but no code or `event-call`. It could come up on critical hits, like the way ships have an exploding effect, to underline that you just... heh... cut off a guy's arm or something.)

Are smoking chimnies called up by some code or just sort of built in? What'd be perfect, instead of just ambient smoke, would be an actual smoking hookah in the room.
 
Yes, called. Smoke locators trigger a particle system creation of type "smoke" upon the locator.
Check LocationsParticles.c, there are a number of locators that trigger PSs. Including Waterfall, which is commented out.

You can add a new case, say, opiumsmoke. Just duplicate an existing if(CheckAttribute() block from the top of the top function, choose which particle system to create, and there you go.
What went wrong making a new particle define in the INIs?

Re: blood. Sure, but the problem is, how to tell where the fellow is struck? You need a position to feed to CreateParticleSystem.
Now, for a gunshot wound, we can guess slightly in front of his/her chest (i.e. get the character's position, find the angle to you, and move back a few units along that angle). But for sword cuts, there's no way to know (and you're standing close enough it'd look wrong to make a guess).
Well, if we know what attack is being used (i.e. by restricting fighting animations) we can make an _educated_ guess, by having a lookup table of attack animation types and the final sword displacement relative to the character doing the attack...
 
Back
Top