Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » fix: throwing knives
fix: throwing knives[message #101664] Tue, 10 August 2004 02:30 Go to next message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
Got that sorted. No point in posting the code here - I'll wait for someone to wake up and sort out CVS access..

Summary of changes:
[1] tk drop when hitting wall/window. When stopped, stays the same type (bloody stays bloody, clean stays clean)
[2] when hit by tk and inventory full, a bloody tk is created, as opposed to a clean one, and dropped on the ground of the target. Previously, a clean tk was created.
[3] throwing a bloody tk at the ground doesn't clean it - it stays bloody.
[4] when repairing an object, a clean tk replaces the bloody one if it fixed to 100%.

I was thinking about putting some degradation to the tk quality for each use - perhaps 10% for hitting the terrain, and 5% for hitting a soft squishy human body. Thoughts?

Next, external voice files - or vehicle handling (ie: add an inventory/boot/trunk to vehicles). Nasty, but I think I can do either one of them. I can't think of any other irritating bugs which bothered me....

Report message to a moderator

Private 1st Class
Re: fix: throwing knives[message #101665] Tue, 10 August 2004 03:29 Go to previous messageGo to next message
Dr.Quack is currently offline Dr.Quack

 
Messages:124
Registered:November 2001
Location: old Europe
Great work, I'm eagerly waiting for a downloadable new JA2 :ok:

Off the top of my head, here are some more bugs:

- the beautiful, for no reason backward walking mercs
- on rooftops, you can't get back onto tiles where one merc has previously scored a kill
- game freeze when enemy reloads a size 2 magazine from one of his editable pockets, for example this happens with the sawed off shotguns of UC and the VC shotgun in SOG
- the exploit where you take a grenade in hand and by faking a throw you can get up without being interrupted

I'm sure there is more..

Report message to a moderator

Sergeant
Re: fix: throwing knives[message #101666] Tue, 10 August 2004 03:47 Go to previous messageGo to next message
Apollo is currently offline Apollo

 
Messages:57
Registered:November 2003
Location: England
That last one, the grenade ploy, has never worked for me. Occasionally I'm able to get up safely, but where I was unable to do so, pretending to throw a grenade didn't help at all...

Report message to a moderator

Corporal
Re: fix: throwing knives[message #101667] Tue, 10 August 2004 04:53 Go to previous messageGo to next message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
Dr. Quack,

Editable pockets? When the enemy reloads? How do you know what pocket an AI controlled actor is reloading from?

I'm a bit confused... clarify, please?

Report message to a moderator

Private 1st Class
Re: fix: throwing knives[message #101668] Tue, 10 August 2004 06:33 Go to previous messageGo to next message
Dr.Quack is currently offline Dr.Quack

 
Messages:124
Registered:November 2001
Location: old Europe
editable pockets = those that are accessible through the UB editor
uneditable pockets = those where they get autogenerated ammunition (and breaklights)

Now if you put extra ammo (eg. for dropping) in one of their editor pockets, they will use that to reload their guns. And if that happens to be a size 2 magazine such as double buckshot, the game freezes and has to be killed. There was very persistant crashing in SOG'69 that turned out to be caused by this, and I had the same thing several times over in a UC subway sector recently.

Report message to a moderator

Sergeant
Re: fix: throwing knives[message #101669] Tue, 10 August 2004 09:07 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:286
Registered:September 2000
Location: USA (by way of the Old Wo...
Quote:
Originally posted by Jujigatame:
[3] throwing a bloody tk at the ground doesn't clean it - it stays bloody.
[4] when repairing an object, a clean tk replaces the bloody one if it fixed to 100%.
I don't think this is a good idea. As everyone knows, having bloody and clean knives as separate objects is a pain in the neck as it is, because they can't be stacked in the same slot. So you usually want to either have all clean knives or all bloody knives. If bloody knives become clean every time you repair your equipment, that will increase the inconvenience exponentially. Also, how are you going to deal with several bloody knives stacked in the same slot? What if some of them are repaired and others are not?

Leave the cleaning by throwing into the ground as well: if you need a clean knife, it's a fast and easy way to achieve that. Besides, it's such a cosmetic issue, it's not really worth changing.

Report message to a moderator

Master Sergeant
Re: fix: throwing knives[message #101670] Tue, 10 August 2004 10:02 Go to previous messageGo to next message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
If you can tell me which sector it's in and how to reproduce it, I might be able to sort it out.

Does it CTD or does the JA2.exe proces jump to 100% and stay there?

Report message to a moderator

Private 1st Class
Re: fix: throwing knives[message #101671] Tue, 10 August 2004 11:39 Go to previous messageGo to next message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
Quote:
Originally posted by Snap:
If bloody knives become clean every time you repair your equipment, that will increase the inconvenience exponentially.
I agree - it's pointless without degradation when tks are used. But that as I said, I was planning on putting that in. In that case, it makes it simpler to manage - clean ones are generally fixed, while bloody ones generally need to be repaired.

Quote:
Also, how are you going to deal with several bloody knives stacked in the same slot? What if some of them are repaired and others are not?
Simple - put it in a free inventory slot if the repairer has one, or drop it on the ground at the repairer's XY coordinates. Pilfered the code from the hit-by-tk. The old (bloody) one gets deleted, and a new (clean) one gets created.

Report message to a moderator

Private 1st Class
Re: fix: throwing knives[message #101672] Tue, 10 August 2004 13:02 Go to previous messageGo to next message
Chris Camfield is currently offline Chris Camfield

 
Messages:68
Registered:February 2000
Location: Toronto, Ontario
I think that if you're considering adding more weapons, dropping the bloody throwing knives might be a good idea.

Otherwise, maybe they could be a non-weapon item and you could clean them (by "using" them)... I'm not sure if there's an action cursor which would support this though?

Report message to a moderator

Corporal
Re: fix: throwing knives[message #101673] Tue, 10 August 2004 13:31 Go to previous messageGo to next message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
Chris,

I don't know about the code you got (c++ version?), but the version I have (digicrab's) has already externalized the weapons data into an XML file - I'm in the process of doing the same for Items - my objective is to get a JA2 exe which can be dropped into UC with a minimum of fuss. They've altered a lot of the graphics and weapons data, so I'll have to re-import as much of the data as possible.

As for throwing knives - I suppose at this stage I don't want to do anything which alters the game balance or feel - just fixing some irritating bugs which you lazy buggers never got around to fixing. I'd rather leave it to the modders to decide what they want to do - so in that respect, I'm more interested in adding to the game than I am in making any changes which would make any fundamental changes (as opposed to additions).

Without sounding like a fan-boy, I think you guys did a fantastic job with JA2 - I don't think I can improve on your work, and I'm content to make tweaks here and there as opposed to fundamental changes.

Hmm... I'm going to have to put in any changes in an ini file, so that people can turn on and off the code tweaks... At least that should muzzle the critics. If they don't like it, they can just turn it off...

*AHEMM* - debugger for JA2 dev? What did you use?

Report message to a moderator

Private 1st Class
Re: fix: throwing knives[message #101674] Tue, 10 August 2004 16:30 Go to previous messageGo to next message
Chris Camfield is currently offline Chris Camfield

 
Messages:68
Registered:February 2000
Location: Toronto, Ontario
We used Visual Studio. Usually remote debugging on a second machine. You could also do a windowed mode compile and run it on the same machine.

Sounds like an interesting project you've got there. I'm going to be leaving all the really hard, I mean interesting, work to you guys. Smile

With the weapons data in an XML file, is the code structured in such a way that the item category limits (50 weapons, etc) are gone or changed?

Report message to a moderator

Corporal
Re: fix: throwing knives[message #101675] Tue, 10 August 2004 18:59 Go to previous messageGo to next message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
Nope - still hard-coded. Not my code.


I think it's Digicrab's code - it just imports the data into the Weapon array. I suppose the limit could be removed without too much bother, but for the time being, it's still there.

I'm going to have to have words with him over this XML punheta (bad word - Pt). The data he wants to expose is all flat, so the primary strength of XML (heirarchical data) is completely wasted. An INI file would be much neater, and GetPrivateProfileString has been ripped apart quite nicely in Graf's 1994 DDJ article, "Multiplatform INI files" (yes, all source included). Why use a dump truck when all you need is a wheelbarrow??? Methinks someone has spent far too much time in pie-in-the-sky web development and not enough time working with code that has to actually run EFFICIENTLY and RELIABLY. KISS, anyone?

Oh, Digicrab, if you get around to reading this, one word: UNICODE!


Anyhow, I'll be exporting the items and descriptions data - though it's going to be in (you guessed it) INI files...

Any thoughts on a tweak to the AI pathfinding for soldiers investigating? I've been thinking about forcing an arced path (random curvature), broken down into perhaps 2-3 waypoints. That way, they don't all come barreling straight at you, but will come in from different angles. It should liven things up a bit, and shouldn't take too much time to code...

Oh bugger me... windowed mode???

Report message to a moderator

Private 1st Class
Re: fix: throwing knives[message #101676] Wed, 11 August 2004 07:23 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:286
Registered:September 2000
Location: USA (by way of the Old Wo...
Quote:
Originally posted by Jujigatame:
I agree - it's pointless without degradation when tks are used. But that as I said, I was planning on putting that in. In that case, it makes it simpler to manage - clean ones are generally fixed, while bloody ones generally need to be repaired.
Doesn't make it any better. You will still have a mix of bloody and clean knives, which eats up inventory space and annoys the player. I say, either drop the bloody/clean distinction altogether, as Chris suggested, or leave it as it is now. No need for aggravation when at issue are just cosmetic things.

Report message to a moderator

Master Sergeant
Re: fix: throwing knives[message #101677] Wed, 11 August 2004 09:39 Go to previous message
Jujigatame is currently offline Jujigatame

 
Messages:38
Registered:March 2004
Location: Oxford, UK
Snap.

Removing the bloody throwing knife entirely would be troublesome. They are two distinct items.

I added a command line option so that you can enable/disable any changes which aren't fixing specifically incorrect behaviour.

Just edit an INI file to turn them on or off.

Currently:
[1] jackaiain's stealing
He implemented an inventory list as you get when you open a box with multiple items - allowing you to strip an enemy to his underwear with a good steal roll. I moved this to optional, as I felt it was too prone to abuse.

[2] Digicrab's XML importing
With the various mods out there, I don't think it's fair to ask people to export all their data to XML and then re-import it. Turn it off if you want to drop JA2.EXE into an existing installation (dunno about UB, but doesn't currently work with UC - dunno - I'll have to chat with the UC guys about what they changed). XML punheteiro...

[3] My throwing knife alterations
Ya, some people are picky. Play with the virgin implementation if you like.

Report message to a moderator

Private 1st Class
Previous Topic: Just a simple bug-fix patch
Next Topic: Can someone send me a copy of the source?
Goto Forum:
  


Current Time: Fri Apr 19 10:26:05 GMT+3 2024

Total time taken to generate the page: 0.01285 seconds