RUNNING WITH RIFLES
http://runningwithrifles.com/phpBB3/

Modding questions
http://runningwithrifles.com/phpBB3/viewtopic.php?f=7&t=1064
Page 1 of 5

Author:  ZnasVecKo [ Fri Mar 08, 2013 8:11 am ]
Post subject:  Modding questions

I have several questions about certain possibilities in modding:
1. Is it possible to make several secondary weapons usable?
2. Is it possible to make several hand grenade items usable?
3. Is it possible to make a weapon with an arcing projectile?

Author:  joneau [ Fri Mar 08, 2013 10:02 am ]
Post subject:  Re: Modding questions

1. i think not possible yet
2.same answer
3. what you mean with arcing?

Author:  ZnasVecKo [ Fri Mar 08, 2013 10:13 am ]
Post subject:  Re: Modding questions

joneau wrote:
3. what you mean with arcing?

By "arcing" I mean after a certain distance, the projectile begins to fall toward the ground (like when you fire a bow, the arrow goes strait for a few seconds and then starts falling) .

Also (for the devs):
4. Can you please make projectile speed and travel distance separate?

Author:  joneau [ Fri Mar 08, 2013 10:25 am ]
Post subject:  Re: Modding questions

hmm. well "arcing" sounds like possible to mod

Author:  pasik [ Fri Mar 08, 2013 1:23 pm ]
Post subject:  Re: Modding questions

ZnasVecKo wrote:
I have several questions about certain possibilities in modding:
1. Is it possible to make several secondary weapons usable?
2. Is it possible to make several hand grenade items usable?
3. Is it possible to make a weapon with an arcing projectile?
4. Can you please make projectile speed and travel distance separate?


1. If I recall correctly, I had a pistol made as secondary weapon once, I was able to pick it up instead of LAW. I'm not sure how well it all works (anymore), secondary weapon support has been largely tested only with one collectable single-use weapon.

2. No, not yet.

3. The projectile has a variable called pulldown_in_air. Note, the soldier doesn't take it into account when shooting currently, so he isn't trying to compensate for it by shooting partially upwards to reach the target he shoots at.

4. I may be missing something here, but there's no such thing as travel distance tracking in RWR. Currently everything is based on time, you can set the time to live for a projectile and you can set the initial speed. Use t=s/v to determine time from distance and speed :) I believe there's a chance this viewtopic.php?f=7&t=1008 might have the calculation built in.

Author:  ZnasVecKo [ Fri Mar 08, 2013 2:02 pm ]
Post subject:  Re: Modding questions

pasik wrote:
ZnasVecKo wrote:
I have several questions about certain possibilities in modding:
1. Is it possible to make several secondary weapons usable?
2. Is it possible to make several hand grenade items usable?
3. Is it possible to make a weapon with an arcing projectile?
4. Can you please make projectile speed and travel distance separate?


1. If I recall correctly, I had a pistol made as secondary weapon once, I was able to pick it up instead of LAW. I'm not sure how well it all works (anymore), secondary weapon support has been largely tested only with one collectable single-use weapon.

2. No, not yet.

3. The projectile has a variable called pulldown_in_air. Note, the soldier doesn't take it into account when shooting currently, so he isn't trying to compensate for it by shooting partially upwards to reach the target he shoots at.

4. I may be missing something here, but there's no such thing as travel distance tracking in RWR. Currently everything is based on time, you can set the time to live for a projectile and you can set the initial speed. Use t=s/v to determine time from distance and speed :) I believe there's a chance this viewtopic.php?f=7&t=1008 might have the calculation built in.

1,2. Aww... :( I was hoping I could make these.
3. I'll try to make something that works using that. Thanks!
4. How do I get S? There is no way to determine S directly. It just baffles me because I once made a rifle with speed 10 projectiles and complete accuracy (accuracy=1,spread_range=0) and after a few seconds, without hitting anything, the bullets disappeared.
Also, how does the grenade falling work?

Author:  pasik [ Fri Mar 08, 2013 2:26 pm ]
Post subject:  Re: Modding questions

ZnasVecKo wrote:
pasik wrote:
ZnasVecKo wrote:
I have several questions about certain possibilities in modding:
1. Is it possible to make several secondary weapons usable?
2. Is it possible to make several hand grenade items usable?
3. Is it possible to make a weapon with an arcing projectile?
4. Can you please make projectile speed and travel distance separate?


1. If I recall correctly, I had a pistol made as secondary weapon once, I was able to pick it up instead of LAW. I'm not sure how well it all works (anymore), secondary weapon support has been largely tested only with one collectable single-use weapon.

2. No, not yet.

3. The projectile has a variable called pulldown_in_air. Note, the soldier doesn't take it into account when shooting currently, so he isn't trying to compensate for it by shooting partially upwards to reach the target he shoots at.

4. I may be missing something here, but there's no such thing as travel distance tracking in RWR. Currently everything is based on time, you can set the time to live for a projectile and you can set the initial speed. Use t=s/v to determine time from distance and speed :) I believe there's a chance this viewtopic.php?f=7&t=1008 might have the calculation built in.

1,2. Aww... :( I was hoping I could make these.
3. I'll try to make something that works using that. Thanks!
4. How do I get S? There is no way to determine S directly. It just baffles me because I once made a rifle with speed 10 projectiles and complete accuracy (accuracy=1,spread_range=0) and after a few seconds, without hitting anything, the bullets disappeared.
Also, how does the grenade falling work?


4. t=s/v <=> s=tv. You can set the time_to_live in a projectile, it is 3.0 seconds if you leave it undefined. The vanilla bullets use 1 second.

In other words, if you want to set a projectile to travel max 100m (after which it either vanishes or explodes depending on its result), and you want it to leave the barrel with 200m/s speed, you set the projectile_speed="200.0" in the weapon specification, and resolve time with t=s/v, t=100m / 200m/s = 0.5s, and set time_to_live="0.5" in the projectile tag.

Or another example, if you want your projectile extra slow like with 10.0m/s setting but be able to travel 100m, you can set t = 100m / 10m/s = 10s.

Pull down in air, i.e. "gravity", is 10 by default, vanilla bullets use 4. For a slow projectile you may need to make it smaller so that it won't drop too fast to the ground. Like said, pull down factor isn't taken into account when shot currently, so the soldier doesn't compensate for it by shooting upwards to shoot in a curve.

Grenade throwing is hardcoded in throw logic. It's currently using all sorts of control variables like a throw distance limit to consider throwing in a curve or just directly to target, throwing speed for the curved throw and direct throw, target max height for the curve middle point to get the direction and magnitude for the throw, max throw speed to cap it, final randomization, and a few helper factors that just seem to help it all function better.

I will expose these once the game needs to support multiple throwables, and it will.

Author:  joneau [ Fri Mar 08, 2013 2:42 pm ]
Post subject:  Re: Modding questions

3. a weapon. which could use arcing would be bow but i think there arent animations for that. i recommend trieing to do a crossbow (of course i can assist with that if you want)

Author:  ZnasVecKo [ Fri Mar 08, 2013 2:46 pm ]
Post subject:  Re: Modding questions

pasik wrote:

4. t=s/v <=> s=tv. You can set the time_to_live in a projectile, it is 3.0 seconds if you leave it undefined. The vanilla bullets use 1 second.

Grenade throwing is hardcoded in throw logic. It's currently using all sorts of control variables like a throw distance limit to consider throwing in a curve or just directly to target, throwing speed for the curved throw and direct throw, target max height for the curve middle point to get the direction and magnitude for the throw, max throw speed to cap it, final randomization, and a few helper factors that just seem to help it all function better.

I will expose these once the game needs to support multiple throwables, and it will.

4 is now clear to me. Thanks again!

About the grenade throwing, will it be modable at any point, and is it possible to make a gun have falloff like it (for the grenade launcher)?

AT Grenade?

Author:  ZnasVecKo [ Fri Mar 08, 2013 2:47 pm ]
Post subject:  Re: Modding questions

joneau wrote:
3. a weapon. which could use arcing would be bow but i think there arent animations for that. i recommend trieing to do a crossbow (of course i can assist with that if you want)

I'll see what I can do about that. Always wanted to make one.

Page 1 of 5 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/