Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → The crazy man has another cog problem
The crazy man has another cog problem
2002-05-26, 12:06 PM #1
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:

Code:
# 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.

Code:
###########
# 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
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-27, 2:54 PM #2
...you could at least reply...
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-29, 8:20 AM #3
... anyone???
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-29, 9:27 AM #4
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.
And when the moment is right, I'm gonna fly a kite.
2002-05-29, 1:40 PM #5
There is some information on playeraction in the JKSpecs if I remember correctly.

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2002-05-29, 3:35 PM #6
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..
2002-05-29, 3:37 PM #7
I looked in DataMaster and JKSpecs, and neither of them mention playeraction:. What is it exactly?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-30, 12:11 AM #8
*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?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 2:48 PM #9
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
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

↑ Up to the top!