PDA

View Full Version : The crazy man has another cog problem



Lord_Grismath
05-26-2002, 03:06 PM
I know, I know, the Cog Forum is a bit of a crutch for me, and I really should download ParSec (I will SOMEDAY), but hey, :P you're here for a reason. And you may launch your tomatoes.... now.

The wise *snicker* sage *double snicker* Grismath had the equally... err... 'wise' idea of adding more than MotS' "twelve or whatever" weapon slots would easily allow.

It was thus that, with the advice of Bel Iblis, the following COG concept was drafted:

A system, basically much like that used in Max Payne, in which the player first selects a class of weapons (i.e. Swords, Bludgeons, Tools) and then the invidual weapon (i.e. Short Sword, Mace, Pitchfork). Meaning that they would for instance hit [1] for the unarmed combat category, and then [2] for Gauntlets.

I decided that a playeraction cog was thus in order, and this is what I've coded so far:



# Rites of Xanthus TC Cog Script
#
# WEAPLIST.COG
# 5.25.02
# -by Lord_Grismath (GrismathDynasty@Hotmail.com)
#
# Description
#
# This allows the player to have a theoretically
# limitless number of weapons (bins permitting)
# and not governed by the default weapon slots.
#
# WORK IN PROGRESS
#
# SendMessage(converse01_cog, user0);
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message startup
message playeraction

int input=-1 local

cog weap_saber_m_cog=0

end

# ================================================== ======================================

code

startup:

SetActionCog(GetSelfCog(), 0x80);
input=0;

return;


playeraction:

if(GetParam(0) == 7.0) {
if(input == -1) {
if(GetParam(2) == 13.0)
{
input=1;
print("Unarmed");
// Unarmed
}
if(GetParam(2) == 14.0)
{
input=2;
print("Daggers");
// Daggers
}

if(GetParam(2) == 15.0)
{
input=3;
print("Swords");
// Swords
}

if(GetParam(2) == 16.0)
{
input=4;
print("Bludgeons");
// Bludgeons
}

if(GetParam(2) == 17.0)
{
input=5;
print("Ranged Weapons");
// Ranged Weapons
}
if(GetParam(2) == 18.0)
{
input=6;
print("Heavy Weapons");
// Heavy Weapons
}
if(GetParam(2) == 19.0)
{
input=7;
print("Staves");
// Staves
}
if(GetParam(2) == 20.0)
{
input=8;
print("Mystic Weapons");
// Mystic Weapons
}
if(GetParam(2) == 21.0)
{
input=9;
print("Tools");
// Tools
}
if(GetParam(2) == 22.0)
{
input=0;
print("Miscellaneous");
// Miscellaneous
}
} if(input == 1) {
if(GetParam(2) == 13.0)
{
input=-1;
print("Bare Fists");
// Bare Fists
}
if(GetParam(2) == 14.0)
{
input=-1;
print("Gauntlets");
// Gauntlets
}
}
} if(input == 2) {
if(GetParam(2) == 13.0)
{
input=-1;
print("Knife");
SendMessage(weap_saber_m_cog, selected);
// Knife
}
if(GetParam(2) == 14.0)
{
input=-1;
print("Poinard");
// Poniard
}
}

ReturnEx(0.0);
Return;

#================================================= ===================================


end


And, here's a part of the items.dat, as I feel that the problem may also lie within this as well.



###########
# Weapons #
###########

# ================================================== ======================================
none 120 0 0 0x004

fists 121 1 1 0x024 cog=weap_fists_m.cog
gauntlets 144 1 1 0x024 cog=weap_gaunts_m.cog

knife 131 0 8 0x0a4 cog=weap_saber_m.cog
poinard 145 0 8 0x0a4 cog=weap_poinard_m.cog

shortsword 148 0 1 0x0a4 cog=weap_shsword_m.cog
two_shortswords 149 0 2 0x0a4 cog=weap_2short_m.cog
bryar_pistol 122 0 1 0x0a4 cog=weap_bryar_m.cog
blastech 132 0 1 0x0a4 cog=weap_blastech_m.cog
two_handed 146 0 1 0x0a4 cog=weap_2hand_m.cog
greatsword 147 0 1 0x0a4 cog=weap_grsword_m.cog

club 151 0 1 0x0a4 cog=weap_club_m.cog
mace 134 0 1 0x0a4 cog=weap_flash_m.cog

longbow 124 0 30 0x0a4 cog=weap_thermdet_m.cog
throwing_axe 152 0 10 0x0a4 cog=weap_axethrow_m.cog
javelin 153 0 3 0x0a4 cog=weap_javelin_m.cog

ugrosh 154 0 1 0x0a4 cog=weap_ugrosh_m.cog

# incomplete from here on

stormtrooper_rifle 123 0 1 0x0a4 cog=weap_strifle_m.cog

para_EWEB 125 0 0 0x0a4 cog=weap_empty_m.cog
repeater 126 0 1 0x0a4 cog=weap_repeater_m.cog
rail_detonator 127 0 1 0x0a4 cog=weap_raildet_m.cog
sequencer_charge 128 0 1 0x0a4 cog=weap_seqcharge_m.cog
concussion_rifle 129 0 0 0x0a4 cog=weap_concrifle_m.cog
EWEB 130 0 32000 0x0b4 cog=weap_EWEB_m.cog

stormtrooper_scope 133 0 0 0x0a4 cog=weap_empty_m.cog

tusken_prod 135 0 1 0x0a4 cog=weap_crossbow_m.cog
para_repeater 136 0 0 0x0a4 cog=weap_empty_m.cog
rail_seeker 137 0 1 0x0a4 cog=weap_railseek_m.cog
manual_sequencer 138 0 30 0x0a4 cog=weap_manseq_m.cog
para_concussion 139 0 0 0x0a4 cog=weap_concrifle_m.cog
carbo_gun 140 0 0 0x0a4 cog=weap_carbgun_m.cog

weaponweight 141 1 1 0x000 cog=weaponweight.cog
cameracycle 142 1 1 0x000 cog=camera.cog
weaponlist 143 1 1 0x000 cog=weaplist.cog
# ================================================== ======================================



I GOOed it all (it's for MotS), and tested it, but it didn't do anything at all. :P

Lord_Grismath
05-27-2002, 05:54 PM
...you could at least reply...

Lord_Grismath
05-29-2002, 11:20 AM
... anyone???

gbk
05-29-2002, 12:27 PM
I have no experiance with playeraction...sorry.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources (http://www.tbns.net/GBK/ol/index.htm).

Sylvicolus
05-29-2002, 04:40 PM
There is some information on playeraction in the JKSpecs if I remember correctly.

------------------
Sylvicolus JK homepage (http://www.lactarius.com/sylvicolus/jk/intro.htm)
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

Jipe
05-29-2002, 06:35 PM
Did you check out Obsidian's playeraction tutorial, here at Massassi? Other than that, sorry, I've had no experience with it and have lost touch with COG..

TheTwistedSpasm
05-29-2002, 06:37 PM
I looked in DataMaster and JKSpecs, and neither of them mention playeraction:. What is it exactly?

Lord_Grismath
05-30-2002, 03:11 AM
*grumble* *grumble*

Well, the playeraction message is a very powerful command unique to MotS. It 'catches the keys' of the player, and can return different values.

Thus, you could cog a vehicle, which, upon activating, would change your control layout, and would allow for different options with the same keys. You could cog a dialogue or menu that works by hitting the number keys.

:P

Well, I guess I'll actually finish the cog first, hehe, and then re-try it and try to debug it myself. However, did I do something wrong with the items.dat? Should I even have that cog in there?

Sylvicolus
05-30-2002, 05:48 PM
The only time I've used playeraction is in my version of a cog for a single camera.
It is the first one on this page.
http://www.lactarius.com/sylvicolus/jk/cogs.shtml

------------------
Sylvicolus JK homepage (http://www.lactarius.com/sylvicolus/jk/intro.htm)
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton