forums | blogs | polls | tutorials | downloads | rules | help

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

How to Recharge Weapon Mana?

I made a Flintlock Pirate Gun for Dungeon Siege.
It works. Fires bullets.
And uses DS's Minigun Magic template.
The weapon is assigned mana points.
Every time it fires a mana point is subtracted.
When the mana/ammo runs out, the weapon stops working.
There is an option to have the weapon disappear.
Which I can do.
But why not be able to buy ammo and then have the ammo recharge the weapon?

I already made an ammo object.

I just don't know if or how a weapon's mana can be recharged.

Also of note, in the gas, you can have the mana regenerate.
But that will make sure the weapon never runs out of ammo.
And this weapon needs some drawbacks, or its just cheating to have.
The drawback should be, ammo is not cheap.
And ammo can run out.

The skrit would be a simple one, I just don't know skrit.
The skrit would run when using the ammo item in inventory.
The skirt would search the inventory and remove the ammo object after right click.
I already have that capacity, borrowed from the potions.
Then next step would search the inventory to find this gun.
And remove it.
And then place a new gun right back into the inventory.
A new gun, which is the same gun, but a newly created one,
will have it's mana recharged, because mana comes with this gun already in the gas.

So I guess my question is,
Does any one know of a mod that places an item into the inventory?
Or can remove and replace?

I like the gun, Chicken George. Maybe you could post some of your mods? The long sleeved a1 would be neat to try out also.

In Witness' Dark/Light elf mod she featured weapons similar to the lightning gun (spell casting gauntlets and wands) except those weapons had a limited number of charges and when you ran out, you had to wait for the weapon to replenish itself which took awhile. Maybe when your gun completely runs out of ammo it could regenerate at a much slower rate and thus wouldn't be overpowered. The player just needs to deal with the risk/benefit of using the gun...It's powerful but one has to also consider the penalizing aspect of the slow mana regen.

Ugh, sorry. I seem to keep posting when I should just hush.

You could always allow the gun to run out of whatever it shoots and then slowly allow it to recharge while using a spell as a back up weapon. (There are many powerful spells that can be recharged with mana potions.) I would think the gun should be equipped to recharge and not just in inventory. You could set how long the gun takes to recharge to like 5 minutes. Then people would say "is the weapon's power worth the risk of having to wait for it to recharge."

Elf

kathycf wrote:

Ugh, sorry. I seem to keep posting when I should just hush.

Oh don't be sorry.
All of your tips and suggestions are important and I really need it.
I'm such a novice at Dungeon Siege and still feeling in the dark.
I always look forward to your comments. They are very helpful.

kathycf wrote:

Maybe you could post some of your mods? The long sleeved a1 would be neat to try out also.

Thank you for the interest in my mods. About posting mods here.
Right now I do not know how to make weapons and armor for the original Dungeon Siege.
So far I've only made them for the Ultima V Lazarus Siegelet.
And the gas literally says, "Good Bye Dungeon Siege."
Because it is a complete rework of how weapons work and effect the environment.
Most of the enchantments do not work on PB weapons.
It's simple enough to make my mods work in Dungeon Siege.
But I have to do some research into DS variables to know how to set the stats of each item.
I know nothing about it or how to make them even available to the game.
Also I think I've only played LOA for about 30 minutes.
I passed one of them once. But have forgotten the whole experience.
Once I do some more research in how DS works, I will post them here.

Project Britannia has just a wonderful pool system for ammo.

Basically each ammo object, once picked up, disappears and adds the ammo amount to a global variable.
The interface even displays it under the bow.
How cool is that?

So I copied the skrits and gasses.
And renamed them when needed because Lazarus shares the names and are not the same functions.
It all worked in Lazarus except the number under the flintlock didn't show up.
That’s probably an interface thing anyways, no big deal.

My ammo item did disappear once picked up.
But even though the ammo count is set to 6 or 12 or 24 bullets,
each ammo item only counted as one bullet.
So if I picked up 3 ammo items of 6 bullets each,
In the end I could only fire 3 times.

Now mind you if I put this Flintlock in PB's Ultima 6 siegelet,
it would function just like the bows do.
And work properly exactly how I want it to.
With no renaming anything.
Just would have to make a custom gas for the bullet instead of arrow.
But I don't like that siegelet.
I don't enjoy playing it.
It looks stunning. Visually impressive.
I think superior to Dungeon Siege itself.
The interface is amazing.
Even the parts I really dislike are still amazing accomplishments in DS programming.
There’s not much I can say against it except I don't enjoy playing it.

Going back to the Flintlock.
Right now it works as a crossbow replacement.
I would like to make a new animation for it.
Just holding out and firing it I suppose.

My new bullet isn't showing up. I think... It is small.
It fires the stone rock in weapons misc.
But it is too big an item to count as a bullet.
Minigun magics can fire anything actually.
A tree. Or a wagon. Or a chicken.

bare_elf wrote:
You could always allow the gun to run out of whatever it shoots and then slowly allow it to recharge while using a spell as a back up weapon. (There are many powerful spells that can be recharged with mana potions.) I would think the gun should be equipped to recharge and not just in inventory. You could set how long the gun takes to recharge to like 5 minutes. Then people would say "is the weapon's power worth the risk of having to wait for it to recharge."

Elf

kathycf wrote:

In Witness' Dark/Light elf mod she featured weapons similar to the lightning gun (spell casting gauntlets and wands) except those weapons had a limited number of charges and when you ran out, you had to wait for the weapon to replenish itself which took awhile. Maybe when your gun completely runs out of ammo it could regenerate at a much slower rate and thus wouldn't be overpowered. The player just needs to deal with the risk/benefit of using the gun...It's powerful but one has to also consider the penalizing aspect of the slow mana regen.

I think I will go with your recharge wait option.
It should fire only one bullet then.
Just as the real pirates, who couldn't stop in a battle to reload.
They just pulled out their swords.
So fire one shot and would have to wait a while.
Maybe even until the battle is over.
That makes the most sense.
Thank you both for clearing that up.

I would really like to know how to replace an item in the inventory with another item.
I have lots of items I would like to have this ability that are not weapons but function by right clicking on.
Or simply place a new item in the inventory.
The code I have I can not figure out how to get it to work.

        		actor$.Inventory.RSCreateAddItem(IL_MAIN, "flintlock");
        		myFlintlock$ = actor$.Inventory.GetItemFromTemplate("flintlock");

ChickenGeorge wrote:

So I guess my question is,
Does any one know of a mod that places an item into the inventory?
Or can remove and replace?

In light/dark elf there’s a skrit called equip_joint that clones an item from the content database and then does some equipping/unequipping.

As I recall I messed around with equipping/unequipping (in DSLOA) for a while and found that it was more problematic than it looked. I often wound up with two versions of the same item, and would eventually get an error. Adding a delay between the unequip/delete and the equip seemed to help. I think the game engine wasn’t updating or something. I don’t remember if I ever got the problem 100% solved.

And don’t get me started on trying to equip a character with custom gear on STARTUP! During the retail game NIS cutscene at the start of the game there’s something going on that ALWAYS re-equips the character with his knife, so merely changing the template doesn’t work. So that sent me on a days-long quest to figure out how the *^*(&^*% to overcome this.

1) I tried using skrit to check if the character was equipped with a knife and switch it out on character creation, but the skrit was firing before the game did it’s thing, so that didn’t work.

2) I tried having the skrit fire when the game state entered SP_INGAME, but that didn’t work. Doing some research on the loading process I found out that the game actually enters SP_INGAME for a brief split second before the cutscene, so the skrit was still firing too early.

3) I then changed the skrit to see if the current state was SP_INGAME and that the previous state was SP_NIS.

Finally got the thrice-damnable thing to do what a simple template change SHOULD have done. Angry

Everything's gotta be complicated.

Klandank wrote:

In light/dark elf there’s a skrit called equip_joint that clones an item from the content database and then does some equipping/unequipping.

Thank you. I will take a look at it.

I did manage to get PB's Ammo Pool item to function like it does in Ultima6.
But when I fiddled more with it, it stopped working.
And for the life of me I can't figure it out.

There are a lot of dependencies skrit. A lot. Most of the functions won't be used in this siegelet I'm working with.
And some of the files would overwrite same named items.
Careful renaming of files and variables.

I've remade the thing completely from scratch 3 times.
And can't reproduce it.

It did not say the number of bullets under the Flintlock in the inventory, as it would in U6 siegelet.
But showed them being used if I hovered over it in the mini slot icon.
And stopped working when the bullets ran out.

This meant the ammo item was being pooled into the ammo variable.
And being used properly as a bullet count.

Whatever I did to make it work, is now gone.
Lazarus siegelet already had the pool variable for food, reagents, and of course the gold.
And U6 just expanded on it to include crossbow bolts and arrows.
They went on to do throwing knives, flaming oil, throwing axes and lots more weapons.
The whole siegelet is remarkable.

Since I got it to work once, I should keep at it.
It is the best idea for the Flintlock.
I do have the other version that fires one shot and waits for the reload.

The other issue is I can't get the [voice] attack to work.
Either in the FLintlock or the bullet.

An earlier bow I made uses these just fine. And it uses minigunmagic as well.
The only sound it makes is as if firing a crossbow bolt.

But any additional voice setting should override specializes.

Another cool thing to add is a puff of white grey smoke when it fires.
I believe the lightning charge effect can be replaced for this.
And probably will have to customize an existing effect.

The effect would have to be a puff of smoke of some kind.
Like the swamp gas puff.
Or something that smokes when opened or exploded.
Just a brief puff of smoke.

years ago there was a mod named Gungeonsiege, in it was a python..it had many guns and their sounds.

just like said below dark and light elves had wands that used mana think something like 30 charges. minigun_lightning does indeed have an effect in global/effects where it plays sound.....
sound play s_e_
u will need to name your sound file with s_e_flintlocksoundnameuusehere
so game can find the sound file

as far as smoke goes I did search I found a smoke_emitter...thing about effects u can run just part of them..like for lightning gun u wouldn't need all the effects as u are just shooting a bullet..indeed the bullet is the ammo temlate...whether it appears jit or not not sure...

as far as inventory goes would also have to modify the game ui to show how many bullets which could require much time.

We had a bunch of guns in that mod, and I did some work to provide stances and animations to go with them. You might find some of that useful. It's somewhere in the downloads here. The minigun animation didn't work for pistols, so they had their own.

This page should give you an idea of what's available.

Darkelf wrote:
years ago there was a mod named Gungeonsiege, in it was a python..it had many guns and their sounds.

just like said below dark and light elves had wands that used mana think something like 30 charges. minigun_lightning does indeed have an effect in global/effects where it plays sound.....
sound play s_e_
u will need to name your sound file with s_e_flintlocksoundnameuusehere
so game can find the sound file

as far as smoke goes I did search I found a smoke_emitter...thing about effects u can run just part of them..like for lightning gun u wouldn't need all the effects as u are just shooting a bullet..indeed the bullet is the ammo template...whether it appears jit or not not sure...

as far as inventory goes would also have to modify the game ui to show how many bullets which could require much time.

Thank you. I will see if I have, or download the siesgelet here.
I have my sound already. And pointed the gun to it, then the bullet.
It just doesn't want to play.
But I am using PB's modified version of the minigun magic so that might have something to do with it.

I got the gun's ammo and item count working. Finally.
PB's minigun sets the weapon to 999 mana, but then completely ignores it.
The setting needs to be though.
And what actually counts is a variable that is increased as soon as you purchace or pickup the ammo object.

I got everything working.
The gun doesn't show the bullet count until you start attacking something.
It will say zero bullets, even after obtaining the ammo.
But once it starts firing, the gun's bullet amount shows up,
and starts decreasing with each shot.
This item doesn't have to be recharged or replace.
The bullet count will go back up once ammo is purchased.

PB's minigun also has the ammo sit on top of the weapon before it fires. Sad
This is good for a bow or a crossbow.
But for a gun looks stupid.
After the first shot it stops doing that.

I will take a look at that effect. Thank you.
I know how to resize effects, and recolor them too.
Change the duration.
Those are the easy figures to figure out. Tongue

ghastley wrote:
We had a bunch of guns in that mod, and I did some work to provide stances and animations to go with them. You might find some of that useful. It's somewhere in the downloads here. The minigun animation didn't work for pistols, so they had their own.

This page should give you an idea of what's available.

Those are amazing. Wonderful job on the weapons.
I hope to be able to do the same.
Also I did not know you made adjustments to the lance import scripts.
That's very cool.

sounds like you are almost done...was thinking about the sound issue some more...if remember right each weapon has a weapon_base...was thinking that maybe the crossbow base sound was being used cause of it...to be honest probably best to not use a minigun/crossbow base but instead copy them gas templates and make flintlock it's own weapon base....or perhaps first just insert the flintlock sound into flintlock.gas template...also sometimes skrit and effect have but I think it the base sound you are hearing...reading effects u can also change duration they played as well...anyways u got this!!!

I'm glad you are making some progress with the gun.

ChickenGeorge wrote:

But I have to do some research into DS variables to know how to set the stats of each item.
I know nothing about it or how to make them even available to the game.

There are a few tutorials on the site that might be helpful for you.

Super Fun Tutorials! Laughing out loud

I found the pcontent one to be good since I tend to be overly cautious when assigning values. I would really like to play the Brittania siegelets but I'm having some weird problems with Dungeon Siege at the moment.

Darkelf wrote:
sounds like you are almost done...was thinking about the sound issue some more...if remember right each weapon has a weapon_base...was thinking that maybe the crossbow base sound was being used cause of it...to be honest probably best to not use a minigun/crossbow base but instead copy them gas templates and make flintlock it's own weapon base....or perhaps first just insert the flintlock sound into flintlock.gas template...also sometimes skrit and effect have but I think it the base sound you are hearing...reading effects u can also change duration they played as well...anyways u got this!!!

That is a good idea.
Since the sounds still playing are crossbow sounds,
just get the items from the high branch templates.
Thank you for the advice.

kathycf wrote:
I'm glad you are making some progress with the gun.

There are a few tutorials on the site that might be helpful for you.

Super Fun Tutorials! Laughing out loud

I found the pcontent one to be good since I tend to be overly cautious when assigning values. I would really like to play the Brittania siegelets but I'm having some weird problems with Dungeon Siege at the moment.

Thank you for the link. Those will be most handy.
I wish I saw them earlier.

My gun has a big problem.
Both U6 and Lazarus share the item and ammo components.
Renaming it doesn't help because I think DS doesn't allow for certain declarations
to occur by more then one skrit.

Just renaming the skrit and nothing else cause the bullet count to stop working.
And Siege editor wouldn't allow it to compile, then disregarded it.
I was also careful to rename the calls in the skrit in further attempts.
But some require the global figure and some don't.
If I use it, it takes priority over the original components.
And they are not the same.
U6 expanded on Lazarus so it may still accommodate it.
But half way through the game, it could crash it.

I might be making a mod that shouldn't be.
Which is a darn shame.
The ammo idea was real cool.
There is a pirate island in the game where you could buy it.
And it makes since to have a bullet count.

UPDATE: Found out that Project Britannia made a compatibility patch for U6 and Lazarus.
http://www.projectbritannia.com/forum/index.php?topic=204.0

About DS mods.
I was thinking maybe since I don't know much about DS,
I could at least make the ART available for use.

I could make the pre-tanked folders with the art and icons,
and namingkey where it needs to be.
Even a dummy template that people can edit proper DS values in.
That way at least I can contribute something to this wonderful site.

I also plan to send you the new all sleeves A1 suit.
But in Gmax I kept overwriting with countless versions.
Frankenstein combinations of the suits.
Wondering what I was doing wrong.
It was the namingkey.
But it was easy enough to make,
And I still have the plate textures for an A1 suit.

I will PM you a link to the ASP when I get it up and going again.

Thank you both for your advice and consideration.

The compatibility patch for Lazarus has made the Flintlock
function as it should in the inventory.

Also PB has uncovered how to make ranged weapons
utilized by the sword hand.
So that when you select ranged slot,
the weapon changes to the flintlock,
but you are still holding the shield.
Coolness.

I do not know how handy this is for me until I make new animations.
Because when I use the original crossbow base, it's held to fire.
But using the weapon hand trick,
ether the bullet gets thrown animation,
or sword swing or axe swing.
I need a weapon type that just holds the weapon still.
But is single handed.
I can go back to the other way as it's not apart of the minigun stuff.

The effect I made didn't even show up.
And I added a sound to the effect.
I thought for sure putting a sound in the effect would
let it finally play. It didn't.

I may have to remake the base from the ground up instead,
as suggested by Darkelf.
That issue is kind of strange and may be a result of modding for Lazarus.

Next will try making effect somewhere else.
In enchantments maybe, but that probably will sit on the weapon.

So all that’s left is make the smoke effect with sound show up.
And a proper firing animation.

For the Halloween Special, I only created a single new weapon class, and all guns were two-handed, even pistols, with different stances for the various types. If you want to have pistol and shield, but also use two-handed long guns, it gets more complex.

Flame-throwers and fire extinguishers were probably just minigun variants, as they remain ranged weapons, but I don't recall how I handled the chainsaws. They were probably treated as one- or two-handed swords.

But in that mod, a lot of the regular weapons could be displaced by the new ones, and appropriate animations substituted. Adding more is often more complicated than replacing.

ghastley wrote:
For the Halloween Special, I only created a single new weapon class, and all guns were two-handed, even pistols, with different stances for the various types. If you want to have pistol and shield, but also use two-handed long guns, it gets more complex.

Flame-throwers and fire extinguishers were probably just minigun variants, as they remain ranged weapons, but I don't recall how I handled the chainsaws. They were probably treated as one- or two-handed swords.

But in that mod, a lot of the regular weapons could be displaced by the new ones, and appropriate animations substituted. Adding more is often more complicated than replacing.

Chainsaws in Dungeon Siege, that's really cool.

New weapons class. That's how to go about it.
Thank you very much.

I finally figured out the correct properties of the Dungeon Siege Wav sound effect files (s_e_*)

I read somewhere that it had to be 8bit. But that wasn't the case.
Dungeon Siege wav sound effect files need to be 16bit mono, 22050 KHz.
Otherwise it will not work. The bit, mono channel and khz had to match the sounds from DS itself.
The program I used to save the file to those properties was XP's Sound Recorder.
Which, if you don't have it, can download from somewhere and place it in your computer's
system32 folder.
Once it is there right click on it and select 'properties'.
Then select 'compatibility'.
Then select XP os.
You can export a sound from Dungeon Siege with tank extractor,
from the game's sound\effects folder. (names: s_e_*.wav)
then load it with XP's sound recorder,
and look at the properties of the wav file.
With your own sound effect, make sure it matches the same properties when saving it.
Most here know this already
but information for a 20 year old game isn't so easy to find these days.

The puff of smoke effect I made didn't quite work.
It seems not to show up when replacing the minigun lightning with it.
So I added it to the [common] as a trigger,
and it showed up, but over the target and not the gun itself.

I was trying to make a transform spell for Lazarus.
And I think animations for monsters have the same suffixes?
Perhaps the game knows what animation will be the attack or fidget
because these animations always end the same.
Although the gas tells it anyways.

I saw an animation call in the [body]
of the chicken gun.
I'm guessing that this isn't for the gun but maybe the bullet/chicken that gets fired.
But it looks like, if we know the right portion of gas,
we can hotwire animations to weapons.

Lots of interesting ideas there ChickenGeorge. So, silly question on my part but what sort of functionality does the compatibility patch offer? Can you have both siegelets pointing to the same folder of resource files in their respective shortcuts? I notice that the last post in that thread was from 2012, and I am not familiar enough with either project to tell what was made compatible.

Long sleeve a1 looking good.

kathycf wrote:
Lots of interesting ideas there ChickenGeorge. So, silly question on my part but what sort of functionality does the compatibility patch offer? Can you have both siegelets pointing to the same folder of resource files in their respective shortcuts? I notice that the last post in that thread was from 2012, and I am not familiar enough with either project to tell what was made compatible.

Long sleeve a1 looking good.

When using the compatibility patch from Project Britannia,
it allows the advancements of PB's Ultima 6 to be used in Ultima 5 Lazarus.
The patch I believe is for modders who want to add more stuff to Lazarus that would normally only work in U6.

This includes new weapons base.
New commerce functions.
New pool counts of items.
Many more interesting weapons.
The ability to use range weapons with the sword hand is a cool one.
More equipment modifiers.

To tell the truth I've only played U6 for a minute and don't know everything yet.

The story is first PB made Lazarus.
Then they made Ultima 6 False Prophet.
Having delved deep into DS programming with 5,
they learned a ton of useful information.
They also had very creative tools that builds entire Dungeon Siege Siegelets.
Mostly revolving around the Ultima theme and system they created.
They released a good portion of the tools.
I think we need java to use them.

The PB system is called base Britannia dsres.
The files are:
Britannia_Art.dsres
Britannia_Logic.dsres
Britannia_Sound.dsres

Those files are the meet of an Ultima world.
If we were to make an additional sieglets with the system,
we would go on to make our own named 'inclusions' to the world.

Lazarus has the 3 dsres files mentioned above.
But also has lazarus_art.dsres and lazarus_logic.dsres and lazarus_sound.dsres and finally lazarus_MAP.dsres.

So the map is Lazarus and 3 more files that support it.
When finding items for the game, if it is world specific, look to the Britannia dsres files.
When finding items that are for Ultima V Lazarus, look to the Lazarus versions.

In the same way, Ultima 6 False Prophet includes the Britannia files,
but also includes additional files for it's world U6P(whatever).dsres

However, they made considerable advancements in the Britannia system,
great changes to the Britannia dsres files,
that they no longer functioned properly in Lazarus.

So, they decided if somebody wanted to utilize those advancements,
Lazarus needed a patch to make them work.

Requirements:
1. Both Ultima V Lazarus Siegelet, and Ultima VI siegelet.
(I tried using the updated britannia dsres files at the same place where I downloaded the patch but they are old versions and the game broke still)
You need the latest versions from Ultima6.
2. 3 files from the resources folder of Ultima 6 (False prophet):
Britannia_art.dsres
Britannia_logic.dsres
Britannia_sound.dsres
3. The patch pb_laz_comp_layer.dsres... http://www.projectbritannia.com/forum/index.php?topic=204.0

Instructions:
1. Download and install both Lazarus and False Prophet.
2. Copy those 3 files from U6
3. Paste them into the resource folder of U5 Lazarus.
They will replace them.
4. Then paste the patch there... pb_laz_comp_layer.dsres

Afterward you can make new mods that use the spells, and weapons and custom minigun magic.
I haven't tested it fully yet. I trying to finish my mods before a game play.
But I think one or two mods may be broken since adding the patch.
And not all mods for Lazarus are compatible with the patch.
One has to judge the worth of it in the end.
I have yet to test it fully.

Thank you very much for the compliment.
The suit finally worked after endless head scratching moments.
In the end I settled for making the arms outside of Gmax and then importing them,
then replacing the arms of the art asset of farmboy and girl.
But, the uvmap sits over the leg portion.
Which for me at the moment was fine because I was making a plate armor version.
But if one wants to have neat shirts and stuff,
the legs and arms can't share the same parts.

So, for Dungeon Siege fans I will make another version that remakes the whole uvmap.
I ended up having to do all the weights from scratch anyways so why not everything else?
This way if somebody wanted to make shirts for it, I can also provide a template for how to go about it.

I'm glad you didn't hurt yourself too bad.
Get well soon. Smile