I have an island inhabited by monks who allow people with no weapons and armour on, including inventory.
It would be an incredible pain in the ass if I had to use the ga_equipped *not* / ga_check_item *not*, because I have around 200 combat items lol
Is there a code/condition which checks if the player has NOTHING equipped on them? I understand that checking the inventory too would be something manually do.
Check nothing equipped?
#1
Posté 27 juin 2015 - 06:15
#2
Posté 27 juin 2015 - 06:24
I have an island inhabited by monks who allow people with no weapons and armour on, including inventory.
It would be an incredible pain in the ass if I had to use the ga_equipped *not* / ga_check_item *not*, because I have around 200 combat items lol
Is there a code/condition which checks if the player has NOTHING equipped on them? I understand that checking the inventory too would be something manually do.
Hi K Kin,
Do you mean "NOTHING" or "no armour and weapons"?
If you mean "NOTHING" then GetFirstItemInInventory returning OBJECT_INVALID would confirm inventory is empty.
If, however, you mean no weapon or armour (which is what I think you mean), then cycle through inventory using a loop and check if it is a ranged or melee weapon ... or armour.
I do not have access to the toolset at the moment, but there are functions that check if an item is a weapon or piece of armour. I think its something like GetIsWeapon or something like that. Sorry, I also cannot confirm the include its in either at the moment, but I am guessing its something like "ginc_items" ... although that is just me guessing.
Cheers,
Lance.
#3
Posté 27 juin 2015 - 06:28
I scripted Crimmor so you can be patted down for weapons, it includes a whole system of clothing and armor specifically designed to hide weapons on yourself to get past weapon checks, including lead lined options to hide from even magical detection, allows exceptions by weapon type if you want (only blunt weapons allowed here...), and includes weaponry specifically designed to be hidden (spring loaded daggers and such). You could need to modify that scripting to meet your needs.
If you really don't want exceptions, you just cycle through equipped and inventory of the party and check whether the item is a weapon or armor.
#4
Posté 27 juin 2015 - 06:50
Hi K Kin,
Do you mean "NOTHING" or "no armour and weapons"?
If you mean "NOTHING" then GetFirstItemInInventory returning OBJECT_INVALID would confirm inventory is empty.
If, however, you mean no weapon or armour (which is what I think you mean), then cycle through inventory using a loop and check if it is a ranged or melee weapon ... or armour.
I do not have access to the toolset at the moment, but there are functions that check if an item is a weapon or piece of armour. I think its something like GetIsWeapon or something like that. Sorry, I also cannot confirm the include its in either at the moment, but I am guessing its something like "ginc_items" ... although that is just me guessing.
Cheers,
Lance.
I mean't nothing, woops
The caps were meant to mean that nothing at all.
#5
Posté 27 juin 2015 - 06:50
I scripted Crimmor so you can be patted down for weapons, it includes a whole system of clothing and armor specifically designed to hide weapons on yourself to get past weapon checks, including lead lined options to hide from even magical detection, allows exceptions by weapon type if you want (only blunt weapons allowed here...), and includes weaponry specifically designed to be hidden (spring loaded daggers and such). You could need to modify that scripting to meet your needs.
If you really don't want exceptions, you just cycle through equipped and inventory of the party and check whether the item is a weapon or armor.
Thanks, I'll download it! What's the script called so I can find it easier?
#6
Posté 27 juin 2015 - 07:47
You can look at the conversation called "sh_docks_nellard_doorguard" in the docks module. There is a script called gc_sh_hidden_pocket_armor_frisk, where a doorguard in the docks frisks you for weaponry. The door guard for a merchant at the riverfront will not unlock the door for you unless you pass the check.
You can look in the campaign folder for the gc_sh_ set of scripts, as there are a couple of levels of checks, depending on how thoroughly you want to check the party.
#7
Posté 27 juin 2015 - 08:07
Hi K Kin,
Sorry, I am getting a little confused with what you are asking ...
For instance, "Check Nothing Equipped" (your title), would mean you are just checking that the PC does not have items equipped (but may be holding them in their inventory). However, your opening line in your original post implies you are then checking they have "no armour or weapons" either "equipped" or "in their inventory". Your last response, implies nothing at all in either "equipped" or "in their inventory".
Just to help you explain what you need .... Checking for items "equipped" is not the same as "checking for items carried (either equipped or in their inventory)". And, just to be clear, checking for just weapons or armour is NOT the same thing as checking for other items that may also be equipped or just being carried.
However, maybe taking a look at Kamal's script is the best solution for you, as that may help explain some things in general anyway. ![]()
The question is hard to answer because I am not clear what it is you actually are asking, which may be due to you not yet fully being able to distinguish the way equipment (all types, including armour and weapons) are differentiated one from another, and how they relate to different aspects of script. I hope what I say makes sense and you take it the right way ... no offense is meant by it. ![]()
Regards,
Lance.
#8
Posté 27 juin 2015 - 08:33
Yeah, I realized that after I posted because I'd like the player to aboard the ship with food and other items xD
I guess this might be too hard to do after all, because I have no storage. I have a bank mod which only stores gold, but I haven't been lucky enough to find a bank mod which stores items. Maybe I'm not trying hard enough.
But yeah, to clear things up, what I meant was;
You can't carry armour or weapons (equipped or in inventory) onto the island.
#9
Posté 27 juin 2015 - 09:18
I guess this might be too hard to do after all, because I have no storage. I have a bank mod which only stores gold, but I haven't been lucky enough to find a bank mod which stores items. Maybe I'm not trying hard enough.
If this isn't a PW, the party can just put anything into a convenient chest, armor rack etc. That's what I did for Crimmor, just put armor racks right there and had the door guard tell the pc that he would watch their stuff.
#10
Posté 27 juin 2015 - 11:17
If this isn't a PW, the party can just put anything into a convenient chest, armor rack etc. That's what I did for Crimmor, just put armor racks right there and had the door guard tell the pc that he would watch their stuff.
Unfortunately it's a PW ![]()
I plan at sometime in the future making a semi-bank system for our PW.
Not an official storage facility, but it will swap your items for a noted version which weighs nothing and un-useable.
#11
Posté 29 juin 2015 - 12:21
Yeah, I realized that after I posted because I'd like the player to aboard the ship with food and other items
I guess this might be too hard to do after all, because I have no storage. I have a bank mod which only stores gold, but I haven't been lucky enough to find a bank mod which stores items. Maybe I'm not trying hard enough.
But yeah, to clear things up, what I meant was;
You can't carry armour or weapons (equipped or in inventory) onto the island.
Hi K Kin,
I note in a later post that this is for a PW.
Personally, I think what you are asking in this post (about checking for armour and weapons onto an island) is relatively straightforward. HOWEVER, at this stage of my own skills and abilities, setting up a PW is out of my league.
What I am trying to say is that I think you may want to lower your ambitions regarding a PW and, instead, try to get a working module for a SP at this stage of your campaign development. Once you have mastered that, like coding for this sort of thing you ask here about checking for armour and weapons, then moving onto doing something for a PW might be the next step.
If I have misjudged you, I very much apologise. I am just trying to save you a lot of struggling in deep water, when its best to enjoy a gentle swim to begin with.
I would not want to see you discouraged from your ambition just because you nearly drown.
I'll edit back in a short while letting you know which include file to look into regarding what you need to do.
EDIT: OK, I'm back, and the include file is the one I mentioned earlier ... ginc_items.
Here is just one useful function in there ....
// Is this a weapon of any type (including ammunition).
int GetIsWeapon(object oItem)
{
return(IPGetIsMeleeWeapon(oItem) || IPGetIsRangedWeapon(oItem) || IPGetIsProjectile(oItem));
}
Cheers,
Lance.
#12
Posté 29 juin 2015 - 07:55
Heh, if Lance Botelle tells you he thinks you should scale things back a bit, he probably knows what he's talking about. ![]()





Retour en haut






