Jump to content

Press X for action


deleyt

Recommended Posts

Since Wolfsong is kinda answering most of the questions regarding modding (for which I'm gratefull) I was wondering if you could answer this one:

The action key (default "X") is triggering several actions like picking up rifles or planting C4.

Is the action key hardcoded (or modulized as you will) to just work with those two events, or would it be possible (through XML perhaps?) to change or even add other events to this action key?

Additionally, is there another way to interact with objects through PhysX besides pushing or shooting them? IE using a keystroke to trigger a physical event?

On a sidenote I might also raise the question if we will be able to mod PhysX and if so, if there's gonna be any info on that.

Link to comment
Share on other sites

The action key (default "X") is triggering several actions like picking up rifles or planting C4.

Is the action key hardcoded (or modulized as you will) to just work with those two events, or would it be possible (through XML perhaps?) to change or even add other events to this action key?

I don't think you'll be able to add functions for the action key. It's a key that is checked against through the code when certain conditions are meet, like raying against a plantable object or having close proximity to a vehicle that allows passengers.

Additionally, is there another way to interact with objects through PhysX besides pushing or shooting them? IE using a keystroke to trigger a physical event?
Please explain more. I don't think you'll be able to use a keystroke but there maybe other things if you explain more what you have in mind.

On a sidenote I might also raise the question if we will be able to mod PhysX and if so, if there's gonna be any info on that.
You have full access to the model XML files for each unit. It's in there each units PhysX settings are defined. So you can mod that of course. But you can't mod the implementation of PhysX in the engine on a ahigher level.
Link to comment
Share on other sites

The action key (default "X") is triggering several actions like picking up rifles or planting C4.

Is the action key hardcoded (or modulized as you will) to just work with those two events, or would it be possible (through XML perhaps?) to change or even add other events to this action key?

I don't think you'll be able to add functions for the action key. It's a key that is checked against through the code when certain conditions are meet, like raying against a plantable object or having close proximity to a vehicle that allows passengers.

Too bad. Ofcourse, since GRIN is using modules in their engine for each feature, it would be possible for them add this in a later stage (IE through a patch perhaps)?

Additionally, is there another way to interact with objects through PhysX besides pushing or shooting them? IE using a keystroke to trigger a physical event?
Please explain more. I don't think you'll be able to use a keystroke but there maybe other things if you explain more what you have in mind.

Well, it's kind of a spin-off from my first question but in theory the same.

I was wondering if it would be possible in some way for the player to interact with objects in the scene through use of keystrokes.

Like....you guessed it, doors! ;)

But not restricted to just doors really. It could be anything ofcourse. I know the subject has been raised already if doors would directly be possible in GRAW2, from which I know the answer is "no". So I'm trying to figure out (without knowing much about the engine, yet) if it would be possible to work around it.

One way would be to use a door like the doors used on cars for instance. You can move those, so it should be possible to replace the cardoor with regular door-geometry and place it inside a building's doorway.

On a sidenote I might also raise the question if we will be able to mod PhysX and if so, if there's gonna be any info on that.
You have full access to the model XML files for each unit. It's in there each units PhysX settings are defined. So you can mod that of course. But you can't mod the implementation of PhysX in the engine on a ahigher level.

I was thinking more on a higher level I guess (admittedly knowing that it will be long before we get to that level). Like creating your own tumbeling buildings, crashing bridges, etc? Would it be possible for us to do that?

Thanks for answering my annoying questions Wolfsong.

I've got a complete modeled map in Max, waiting to be exported to the editor and I want to figure out how far I can take things.

Edited by deleyt
Link to comment
Share on other sites

Like....you guessed it, doors! ;)

But not restricted to just doors really. It could be anything ofcourse. I know the subject has been raised already if doors would directly be possible in GRAW2, from which I know the answer is "no". So I'm trying to figure out (without knowing much about the engine, yet) if it would be possible to work around it.

One way would be to use a door like the doors used on cars for instance. You can move those, so it should be possible to replace the cardoor with regular door-geometry and place it inside a building's doorway.

Car doors can't be opened/closed really. It's the damage model of the car that pushes out the doors when it gets damaged. So by just using the collision physics you can create "western" style doors. There are "powered" constraint types which want to return to a set state if they get pushed away, so I think it would be possible for modders to use that for a door system. Kind of like the car suspentions are rigged, but with a "hinge" (rotation) instead of a "prismatic" (axis) constraint.

Could be cool as then you can open it slowly by sneaking in. Or when on the inside, push up the door just a little so the rifle sticks out while withing for your pray. Just hve to take that in account when building houses for those doors so there won't a super camper spot. :P

On a sidenote I might also raise the question if we will be able to mod PhysX and if so, if there's gonna be any info on that.
You have full access to the model XML files for each unit. It's in there each units PhysX settings are defined. So you can mod that of course. But you can't mod the implementation of PhysX in the engine on a ahigher level.
I was thinking more on a higher level I guess (admittedly knowing that it will be long before we get to that level). Like creating your own tumbeling buildings, crashing bridges, etc? Would it be possible for us to do that?

Tumbeling buildings can be done now. It's all in the setup of the building inside the model XML file. You'll need a building that is built for it in Max though. Check out the destroyable prop tutorial from GRAW1.

The crashing bridge in mission01 is actually animated. The animation is setup in the model XML and triggered through the missions script.

Link to comment
Share on other sites

Car doors can't be opened/closed really. It's the damage model of the car that pushes out the doors when it gets damaged. So by just using the collision physics you can create "western" style doors. There are "powered" constraint types which want to return to a set state if they get pushed away, so I think it would be possible for modders to use that for a door system. Kind of like the car suspentions are rigged, but with a "hinge" (rotation) instead of a "prismatic" (axis) constraint.

Could be cool as then you can open it slowly by sneaking in. Or when on the inside, push up the door just a little so the rifle sticks out while withing for your pray. Just hve to take that in account when building houses for those doors so there won't a super camper spot. :P

Yeah

Well, using constrainted doors would be all you need really.

How many constraints would be possible to use on one object? unlimited, I take it?

Looking at a door physics-wise it should only have these constraints:

1) X and Y-coordinate (to keep the door in place)

2) rotational-constraint (only swinging the door 100 degrees back or forth, full swing 200 degrees)

3) counteracting force to simulate weight of the door and friction in the hinges (possibly already taken into account by the engine when weight is added to the object's XML?)

4) some sort of "resetting" constraint once the player moves away from the door to pull it bak into place (kinda like a doorspring)

One problem though: since you can only use the damage-model, you can't blow up the door anymore because the damage-model is already used?

The car uses several stages of it being demolished...this can work for the door too, right?

Set it in the first state as being damaged, but the door actually being complete.

Moving it into a damaged model (second state) once it is shot?

I will install GRAW again and see if I can still export my map into the editor. Also will check out those tuts that came with it.

Thanks again.

Edited by deleyt
Link to comment
Share on other sites

How many constraints would be possible to use on one object? unlimited, I take it?

Looking at a door physics-wise it should only have these constraints:

1) X and Y-coordinate (to keep the door in place)

2) rotational-constraint (only swinging the door 100 degrees back or forth, full swing 200 degrees)

3) counteracting force to simulate weight of the door and friction in the hinges (possibly already taken into account by the engine when weight is added to the object's XML?)

4) some sort of "resetting" constraint once the player moves away from the door to pull it bak into place (kinda like a doorspring)

1) no constraint, it's the world coordinate as placed in the editor. The object itself would be static with a dynamic part.

2 & 4) same constraint. Hinge with power to try and return it to it's inital state.

3) No other way they weight to do this I think. And I guess this will be hard to deal with anyhow.

One problem though: since you can only use the damage-model, you can't blow up the door anymore because the damage-model is already used?

I think you're wrong. I think you can set up different responces based on the type of damage. I'll look at it as I'm not sure how the damage manager from GRAW2 works.

The car uses several stages of it being demolished...this can work for the door too, right?

Set it in the first state as being damaged, but the door actually being complete.

Moving it into a damaged model (second state) once it is shot?

Yes. Multiple damage stages should be possible. Again I'm not sure what can be done in the damage manager, but I'll look at it.
Link to comment
Share on other sites

@delyet

you can use the car door in first stage of damage, cause you can later shoot it off the car. so the damage model works in multiple stages.

*in dutch*

(... volgens mij werkt de auto deur in drie fases, heel, kapot, en afgebroken, als je een nieuwe dynamishe auto kapot schiet, dan zie je em eerst open gaan, (glas kapot,soms heel) dan kan je em bewegen, en als je dan verder schiet dan valt hij er af. je zou bijna gaan denken aan een m4 masterkey config voor een wapen... :P dat zou denk ik best werken, ook die van die militaire autotjes, ff naam kwijt, met die vier inzitende achterin, hebben een scharnier, en ook deze kan bewogen worden door de speler.)

Link to comment
Share on other sites

Seems like your on top of things Wolfsong.

Don't get yourself burned up though, gotta get some sleep some time. :)

I'll wait for that info you're trying to get.

In the meantime I'll just try to get my map back into GRAW2 properly and do some test, like Biro.

We'll be helping eachother out I'm sure, with stuff we're learning bit by bit.

Leaves me with saying thanks for the dedication you're putting into this. :thumbsup:

@sui: your explanation is confirmed by what Wolfsong is saying. Thanks for your input. :thumbsup:

Link to comment
Share on other sites

Don't get yourself burned up though, gotta get some sleep some time. :)

Don't worry. After the 22nd you'll see a lot less of me here as my feance comes back home. So until then I'll post as much as I can. :thumbsup:

I should put that on the news page so we get the most out of you before then :thumbsup:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...