Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » 1.13 Xml Editing
Re: 1.13 Xml Editing[message #11652] Tue, 13 September 2005 02:14 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
Diff, one of the most important words in a programmers dictionary Smile

Anyway yeah, but I have more free time right now, than Mugsy does, so I'm hoping to take some of the community pressure off of him. I'm about to start doin 90% bug hunting / 10% new developemnt, but I wanted to get that UB Imp stuff in really bad so I had to go ahead and do it.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11653] Tue, 13 September 2005 02:59 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
There are several locations where items are still hardcoded:

- IMP generation
- Enemy non-gun equipment
- Quest items

Your safest bet is to leave items in their original slots and just add stuff. You could also replace items with similar items (ie: replacing the gas mask with another gas mask).

There are things like the rocket rifle that pertain to quests, so you should probably just disable them by setting their NotBuyable tag to 1 and removing them from EnemyGunChoices.

Also note that the price for the Kevlar Leather jacket is used in dialogue in the game, so it shouldn't be changed (unless you're going to get rid of that leather shop guy in San Mona).

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11654] Tue, 13 September 2005 03:46 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I do just overwrite existing slots with similar items (I figured this was the safest way to avoid conflicting with parameters that are hidden to me) but I have a strong feeling that one or more of the items (I'm thinking the AutomagIII because I've replaced most of the other ones without a glitch) causes a conflict if you change it's name since maybe this is the 'tag' the program draws from to initialise quests.

Does this make any sense?

Anyway, if it's just the Automag that would be fine. I could easily explain this one as an experimental weapon and I know I can change it's characteristics so it's no big deal. But ideally I'd like to overwrite the item or items that are causing these crashes. It makes the game more 'flexable' and that's always good.

I also played with switching the silenced tag on (add a 1 instead of the zero) and it doesn't seem to be working. This is kind of hard to test since some enemies spot you as soon as they see you but I'm working on figuring out whether this works. I'll let you know when I get another chance to get online. My roadtrip is minutes away and hotel internet connection is sometimes a white Elephant.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11655] Tue, 13 September 2005 05:31 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
I'll check out the silenced tag later tonight. Keep in mind that the silencing object's status plays a role in how much the enemies hear.

You can also try setting the weapon's volume to <= 10.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11656] Tue, 13 September 2005 19:57 Go to previous messageGo to next message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
how can i cahnge the pic of a gun? i wan to change the Val Silent sniper pic to the real thing. i've got a big item pic from Rubicon( THIS ) but what else do i have to do?

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11657] Wed, 14 September 2005 03:16 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
To change a pic:

First, you need to figure out which pic it is that you want to change. Open up the items.xml and find the item whose graphic you want to change. Look for the ubGraphicNum tag, and the number in there is the graphic # of the item. In the ubGraphicType tag, is the type of graphic used: 0 = guns, 1-3 = other items.

There are three graphics for every item:

1) The big one you see at Bobby Ray's and in the detailed description box

2) The medium sized one you see in your merc's inventory

3) The small one you see on the ground in the tactical screen

You'll need an STI editor to change the pictures, too. Search for STI-Edit. It may crash when you exit, but does the job ok.


1) Big Pic: In the Data\BigItems folder are a bunch of .sti files. The number on these files corresponds to the graphic #. If the graphic type you want to change is a gun, then you want to find the GUN##.sti file, open it up and change the pic. If the graphic type is an item, then you want to find the P[GraphicType#]Item##.sti file instead.

2) Medium Pic: In the Data\Interface folder are some more .sti files. For guns, you want to open mdguns.sti, and for other items you want mdp[GraphicType#]Items.sti. Open up the file using STI-Edit, or whatever, and navigate to the location of the graphic #. You can then replace this pic too.

3) Small Pic: Same as medium pic, but they're in the data\tilesets\0 directory, and they're called smguns.sti and smp[GraphicType#]items.sti. You may also need to fiddle with the offsets for the small picture to center it.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11658] Wed, 14 September 2005 03:35 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
EDIT


Sorry, Mugs beat me to it.

Just use STI Edit (which should be available through Ja Galaxy but if you have trouble I'll mail it to you). This utility allows you to alter almost all ingame images and import .bmp pics into the game. Be careful to make sure you're .bmp is the same pixel size (even a few pixels off can cause problems) and that the backgroud colour is exactly (and I mean precisely) the same colour as a regular .sti of that type.

If it's already in .sti form you can just extract it into .bmp form (there is a button for that in the easy to use utility) then reimport it (making sure it's file numbers correspond to whatever images you're trying to overwrite) back into all three of the files.

These are contained in the:
BIGITEMS
Interface/mdguns.sti and
Tilesets/0/smguns.sti
directories of you're Data folder

There are several walkthroughs on using this utility available both here and at Lords of the Bytes. If you have trouble, just e-mail me (but since I'm on the road it may take a day or so for me to get back to you) and I'll send you both the utility and a few text files I copied that offer tips on using this beauty.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11659] Wed, 14 September 2005 03:37 Go to previous messageGo to next message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
tnx mugsy and Khor too. Smile

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11660] Fri, 16 September 2005 08:29 Go to previous messageGo to next message
dextertt is currently offline dextertt

 
Messages:54
Registered:November 2000
XML editing

Does anyone know if it is possible to mass edit xml file data like in a spreadsheet format ? is it possible to use opensource apps like openoffice to import and edit ?

Thanks.

Report message to a moderator

Corporal
Re: 1.13 Xml Editing[message #11661] Fri, 16 September 2005 08:50 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
MS Access would probably be one of the more widely available options. You can open it up in say Excel, but not in the manner I think you're looking for.

Personally I plan on just writing a Delphi application to make editing easier. But I haven't gotten to that point yet. Granted, in Delphi it wouldn't take too long to throw something together though.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11662] Fri, 16 September 2005 08:58 Go to previous messageGo to next message
dextertt is currently offline dextertt

 
Messages:54
Registered:November 2000
Kaiden,

Thanks for the tip. For now I have to go line by line to edit the data.

Report message to a moderator

Corporal
Re: 1.13 Xml Editing[message #11663] Fri, 16 September 2005 09:06 Go to previous messageGo to next message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
i open the .xmls in notepad. i don't edit that much so it's not so pianful to search for what i want to edit . but of course i wouldn't mind any helpful application Very Happy


oh and Sti-Edit is really an easy to use program. Smile

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11664] Fri, 16 September 2005 09:35 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
The thing with using an application, is "Grid" editing, as opposed to line editing. So much easier to edit, but also much easier to mess up and break alot of data.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11665] Fri, 16 September 2005 09:36 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
XMLSpy is pretty decent. It's what we use at my office... But it's not free Sad

There's also XMLNotepad, but I've never tried it.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11666] Fri, 16 September 2005 09:53 Go to previous messageGo to next message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
Quote:
Originally posted by Madd Mugsy:
XMLSpy is pretty decent. It's what we use at my office... But it's not free Sad

There's also XMLNotepad, but I've never tried it.
i just dled the XMLnotepad , tried it and looks nice and simple.

i think i'll use this from now on if it won't crash or mess up anything :ok:

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11667] Fri, 16 September 2005 10:44 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Np. Happy to help Smile

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11668] Sat, 17 September 2005 09:29 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I need to know how to get the LAW animation to work with another weapon?
I've tried messing around with every combination of Rocket Launcher, Single Shot rocket Launcher and Rocket Rifle tags but can only get the weapon to either act like a Rocket Rifle or a Law and not a reloadable Law type weapon (I'm trying to make a Bazooka).
I even tried messing around with the combineables to get a Loaded Bazooka by combining an Empty Bazooka (item 347) and Bazooka Shell (item 346). No luck.

Any tips would be appreciated.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11669] Sat, 17 September 2005 09:55 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Easy way:

Copy the xml from the RPG-7 Wink

Anyway, it's the RocketLauncher tag that you want, combined with the IC_LAUNCHER item type (see the types at the top of items.xml to see what I'm talking about). Then create some IC_BOMB types, like the RPG Ammo, and enable them to be loaded into the RPG in the Launchables.xml.

You shouldn't need to mess around with the combinables/merges/etc.

SingleShotRocketLauncher will try to create a discard item after it fires. RocketRifle is for guns to make their shots have smoke trails.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11670] Sat, 17 September 2005 10:23 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Thanx man!

On another note, I must have been mistaken about quest type items causing crashes with the Items.xml. I've now changed everything up to and including the Automag. Don't know what incorrect data I entered but it's fixed now.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11671] Sat, 17 September 2005 12:01 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Is the RPG supposed to use 23 aps on an unaimed shot?
Also, I got the blacked out (can't aquire a target) cursor on an enemy standing three tiles away.

Has anyone else used the RPG? I need to know if I somehow corrupted it's statistics by messing around with the .xmls?

If I wasn't on the road I'd check it against a clean copy of Mugsy's Mod but I don't have the hard drive space to install this again.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11672] Sat, 17 September 2005 14:05 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
You can't shoot at someone that close because of the the blast radius. That safety distance is hard coded, I believe. It also applies to mortars.

The RPG uses the same APs as the LAW, and they're controlled by the ubShotsPer4Turns tag, like the other guns.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11673] Sat, 17 September 2005 14:28 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Is there any way to switch off the not being able to aquire a target because of blast radius thing? I'm asking because I'm interested in making mods set in times that predate range restricting fuses and would like to have the ability to fire even within the blast radius.

If this isn't possible I'll have to live with it but if it's something I haven't found yet I'd like to know.

Thanx again Mugs.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11674] Sun, 18 September 2005 09:28 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
wudubuquan over at tbsgame.net has added "pocketed" vests and pants through the XML files, ala the ALICE pack. I'll be changing his modifications slightly and adding that in the new relase late next week. But for now, if you'd like to see what all it took to get it working, you can visit the following thread and download his tabledata.rar file.

http://tbsgame.net/bbs/index.php?showtopic=18983

wudubuquan was also responsible in finding and fixing the X-Ray device/detector discrepancy in the items.xml page.

Please keep in mind, that you still cannot attach stacked items, or items that already have attachments, the former simply will not work, and the later will cause you to lose the attachment that was attached to the item you are attaching. Now say that 3 times fast before editing any XML's Razz

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11675] Sun, 18 September 2005 09:45 Go to previous messageGo to next message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
i could never acces that site and i still can't so i'll jsut wait for the release. Neutral

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11676] Sun, 18 September 2005 10:00 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
Majek, it's not the web address Mugsy had posted. That was .ru, this one is .net

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11677] Sun, 18 September 2005 10:33 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Quote:

Is there any way to switch off the not being able to aquire a target because of blast radius thing? I'm asking because I'm interested in making mods set in times that predate range restricting fuses and would like to have the ability to fire even within the blast radius.
Shouldn't be too hard to eventually externalize this.

Kaiden - did they just add all the items to attachments.xml for armour? I can't read much of anything over there; for some reason google won't translate it for me Sad

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11678] Sun, 18 September 2005 10:48 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
Sad What they did, was add a section at the bottom of attachments.xml for every item they wanted to be attachable to the vests and pants. (One entry per attachment/attachee combination as per instructions in the file)

Then they went into Items.xml and set the attachments flag to 1 for all of the items that were attachable. And that was it, vest/pants pockets.

Also if you use the above link, it takes you straight to the post that has the file attached, no translation neccessary.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11679] Sun, 18 September 2005 10:52 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
That's what I figured.

A better, more comprehensive way should be possible after the map data and the profile data have been externalized. Once those are done we can change the central OBJECTTYPE structure and do all kinds of neat stuff.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11680] Sun, 18 September 2005 16:19 Go to previous messageGo to next message
jj is currently offline jj

 
Messages:8
Registered:August 2005
Location: Australia
mm,i have changed the 'DayVisionRangeBonus' to 4 and 'BrightLightVisionRangeBonus' 2 in the items.xml, but it seems that it s not working. when and how these two bonus will work?


and another question is about the % of tunnel vision lost. (i just moved the question form TBSgames to here).

Quote:
how to calculate the tunnel vision? it is said that "(0-100) % of peripheral vision lost". i have changed the "PercentTunnelVision" to 99. but my imp can still see the enemies behind(it is in the 'weapon ready state'), when other group members have found them.

in addition, when i press the 'end' key(which shows the current soldier`s FOV), the area behind my sinper is still shown as 'green'.

did i miss something to change the 'tunnel vision' setting?
Quote:
jjcow,

What item did you add tunnel vision to? If it was a gun or a scope then it'll only work when the gun is raised. The LOS indicator doesn't change.
firstly, the gun is raised. i changed the tunnelvision for the 'sniper scope' to 99.

secondly, i dont know how to explain.(pls forgive me for my poor english Razz ). here is an example:
there are two enemies around Thor, one is in front of him and the other is behind him. when Thor shots the enemy in front of him, he does not see the other one at the back. however, now, Ira is coming and she saw the enemy behinds Thor.

the question is here, now Thor can see the enemy behind him as well. is it normal?

Report message to a moderator

Private
Re: 1.13 Xml Editing[message #11681] Sun, 18 September 2005 18:01 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...
Implementation of vision bonuses has some kinks. I'll be working on that. (Mugsy: I'll let you know when I have something workable. For now, do you have any objections to adding one or two extra attributes to Items? I am thinking of "laser scope" in particular.)

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11682] Sun, 18 September 2005 21:03 Go to previous messageGo to next message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
Quote:
Originally posted by Kaiden:
Majek, it's not the web address Mugsy had posted. That was .ru, this one is .net
i know that but i've already tried to acces that site a month ago because of some pictures in a thread in Others campaigns but and it didn't work then as it doesn't work now. hell if know why.

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11683] Mon, 19 September 2005 01:53 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
That's strange, I had to install the special fonts and everything first time I went, maybe if you have a pop-up blocker it's blocking it.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11684] Mon, 19 September 2005 02:16 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Quote:

Implementation of vision bonuses has some kinks. I'll be working on that. (Mugsy: I'll let you know when I have something workable. For now, do you have any objections to adding one or two extra attributes to Items? I am thinking of "laser scope" in particular.)
Thanks, Snap. No objections to adding to attributes. I need to add some kind of camouflage bonus as well, so I can make this ghillie suit thing work.

What do you need a special laser scope flag for? I thought I covered it in the to-hit bonus. (Unless you mean to split out the to-hit penalty for low condition)

You probably figured this out already, but to write the xml files: Just take a look in Init.cpp, there's a function that does all the reading, and I've written corresponding functions to automate the writing. I find it useful to read in the data and then write it back out to make sure that it's all reading in properly.

Cheers,

MM

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11685] Mon, 19 September 2005 10:12 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
This is a really weird one:

A few of the ammo types I'm using for my mod have 'clip' sizes of one (meaning I'm using individual rounds for some weapons that load one at a time.
I made 80 stack in a slot. This seems to be working fine except that each round has three porno magazines attached!

What the hell is this all about? It's kind of funny but I'm afraid could lead to problems. Is it unwise to stack over a certain number?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #11686] Mon, 19 September 2005 10:27 Go to previous messageGo to next message
DurtyDan is currently offline DurtyDan

 
Messages:103
Registered:November 2001
Location: Oregon, USA
I heard once that you couldn't stack over 8. Several other mods tried that and it did wierd things, mostly CTD. The SOG mod did it with the shotgun shells, which were a constant bug.

Report message to a moderator

Sergeant
Re: 1.13 Xml Editing[message #11687] Mon, 19 September 2005 10:35 Go to previous messageGo to next message
DurtyDan is currently offline DurtyDan

 
Messages:103
Registered:November 2001
Location: Oregon, USA
With all these options being added, it almost seems like the XML files could use a GUI. It would seem like it would be much easier to make now with the work that Mugsy and Kaiden are doing. Any ideas out there? Batman had one for the v1.03/1.06 .exe, but I bet a new one would be much easier to make.

Report message to a moderator

Sergeant
Re: 1.13 Xml Editing[message #11688] Mon, 19 September 2005 16:00 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Stacking is limited to 8 items. You can't go over this without altering the OBJECTTYPE structure in code, and we can't do that until we've externalized the prof.dat and the maps.

There is a constant for it, but hopefully Kaiden didn't externalize it yet (or at least put a huge disclaimer on it), since increasing it beyond 8 will screw up the game and cause random crashes.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11689] Mon, 19 September 2005 17:47 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 Madd Mugsy:
What do you need a special laser scope flag for? I thought I covered it in the to-hit bonus. (Unless you mean to split out the to-hit penalty for low condition)
I would like to add some special treatment of laser-scope bonus: make it depend on the brightness of the target (I already posted the code, but that was before I saw your changes, so now it will have to be done somewhat differently). But that's for later. Right now I am changing the way repair status and light level are factored into bonus calculations. This will take me a while to finish and debug.

We need to think about a proper implementation of binocular-like devices. Right now, any vision or hearing aid, such as NVG, that you have in your hands will give you a vision bonus! That is not right. I am thinking of utilizing the Look command somehow.

Edit: Actually, hand-held items present the most problems in terms of bonuses. Binoculars and such are about the only ones that make sense, and they need special treatment anyway. Right now, if you are holding a pistol in one hand and a sniper scope in another, it has the same effect as if the scope was attached to the pistol! Ditto for the laser scope.

Vests, helmets, and leggings are also capable of contributing bonuses, but that's not a problem unless you are trying to do something silly. What could be a problem are attachments to those items, which in the current code will contribute their bonuses as well. You could very well make NVGs, for instance, attachable to your vest or leggings.

Perhaps we shouldn't try for maximum inclusiveness and just limit item bonuses to raised weapons, their attachments, and head-slot items.

Speaking of bonuses, I wonder what would be the best way to handle the aimbonus. In the original, that was the bonus that applied to the sniper scope. But now you can have other items provide that bonus. Right now, if you manage to attach both the sniper scope and the reflex scope to your gun, their bonus will be cumulative. One solution is to make sure that you never have more than one such item active at any given moment. Another is to change the code so that even if you have more than one, only one will provide a benefit at any given moment. Which should it be?

Quote:
Durty Dan
With all these options being added, it almost seems like the XML files could use a GUI.
Yes, they could.

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #11690] Tue, 20 September 2005 04:19 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Quote:

Edit: Actually, hand-held items present the most problems in terms of bonuses. Binoculars and such are about the only ones that make sense, and they need special treatment anyway. Right now, if you are holding a pistol in one hand and a sniper scope in another, it has the same effect as if the scope was attached to the pistol! Ditto for the laser scope.
Oops. I missed that. I'll put a quick check to see if the item's an attachment for now. And I'll also check for equippable items that aren't currently equipped.

Quote:

You could very well make NVGs, for instance, attachable to your vest or leggings.
This was part of the plan actually: To have them attachable to your helmet. What they could be attached to can be set in the Attachments.xml.

Quote:

Right now, if you manage to attach both the sniper scope and the reflex scope to your gun, their bonus will be cumulative
Already handled: You're not able to do that because they're incompatible (in IncompatibleAttachments.xml).

Quote:

One solution is to make sure that you never have more than one such item active at any given moment. Another is to change the code so that even if you have more than one, only one will provide a benefit at any given moment. Which should it be?
I don't think this would be a good generic way to handle this. A modder might want to assign the same bonus twice to something. For instance, say a mod has some special ammo that is more aerodynamic and therefore gives a range bonus. Should that bonus be lost due to a barrel extender? Maybe, maybe not. It depends on the mod.

We're better off just making certain items incompatible with other items in the xml files. Or maybe we could add some externalized way to allow modders to choose which effects take precedence. We should also externalize the handling of two different effects negating each other.

In fact, now that I'm thinking about it, we could probably add an ItemUsage.xml file and provide an enumeration of the possible effects. Something like this:

Sniper Scope
Reflex Scope
Item1 Takes Precedence

Where effect could be:

Item1 Takes Precedence
Item2 Takes Precedence
Effects Combined
Both Effects Negated
Item1 Acts As Penalty
Item2 Acts As Penalty
...

The bottom line is that this kind of thing needs to be externalized. By the time we're done, if someone wants to make a D&D mod, with a shield +2 and a cloak of protection +1 and make them compatible or incompatible, they should be able to do so.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #11691] Tue, 20 September 2005 08:11 Go to previous messageGo to previous message
Kaiden is currently offline Kaiden

 
Messages:502
Registered:September 2003
Quote:
Originally posted by Snap:
[QB]
We need to think about a proper implementation of binocular-like devices. Right now, any vision or hearing aid, such as NVG, that you have in your hands will give you a vision bonus! That is not right. I am thinking of utilizing the Look command somehow.

Edit: Actually, hand-held items present the most problems in terms of bonuses. Binoculars and such are about the only ones that make sense, and they need special treatment anyway. Right now, if you are holding a pistol in one hand and a sniper scope in another, it has the same effect as if the scope was attached to the pistol! Ditto for the laser scope.

Vests, helmets, and leggings are also capable of contributing bonuses, but that's not a problem unless you are trying to do something silly. What could be a problem are attachments to those items, which in the current code will contribute their bonuses as well. You could very well make NVGs, for instance, attachable to your vest or leggings.
If any of this changes, it should be made an option rather than hard coding it. This way like Mugsy pointed out, if someone wants to make a module where holding something in your hand gives you a bonus, they can. If someone wants to make a module where vests or pants give bonuses, they should be able to. And likewise for items that attach to vests or pants.

Maybe we could add in a global option for each equipment slot, to turn attachment and item bonuses on or off. So you'd have like:

Vest Bonuses on/off
Vest attachment bonuses on/off (Of course this one could back-fire and cause ceramic plates not to work if you turned it off)


Anyway, just my opinion.

Report message to a moderator

First Sergeant

Next Topic: DBB-MOD 910
Goto Forum:
  


Current Time: Sun Jan 05 00:56:50 GMT+2 2025

Total time taken to generate the page: 0.02321 seconds