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 → Cog help
Cog help
2002-06-22, 8:15 AM #1
This is not a cog for a lvl, this is a player cog. I dont know anything about this launguage so mabey someone could write one up really quick.

I need a cog that will allow me to fly, and be able to be used with SBX.

I am not doing this is PO people, but to use in RPGs where I use a transport 3do as my character.
2002-06-22, 10:00 AM #2
When asking for a cog, you have to provide details for the workings of the cog. On what event do you want to make the player able to fly? On what event do you want it to be disabled? And good grammar wouldn't hurt. [http://forums.massassi.net/html/tongue.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-22, 10:05 AM #3
Sorry. Something that would be ideal would be an item in my inventory that toggles flying/not flying, much like damage and trails on SBX3.1.

It should proboly replace a key or something, and I the item appears in my inventory on startup of a game.
2002-06-22, 10:47 AM #4
So you want an item that lets the player fly when it's activated? Here's the code:

Code:
# flyitem.cog
#
# An item that enables the player to fly when activated.
#
# [SM]
#=====================================================#
symbols

int		on		local
int		bin=116	local
thing		player	local

message	activated
message	startup

end
#=====================================================#
code
#--------------------------------------------------------
startup:
	on = 0;

Return;
#--------------------------------------------------------
activated:
	player = GetSourceRef();
	if(on)
	{
		on=0;
		ClearPhysicsFlags(player, 0x2000);
		SetPhysicsFlags(player, 0x1);
		SetInvActivated(player, bin, 0);
	}
	else
	{
		on=1;
		SetPhysicsFlags(player, 0x2000);
		ClearPhysicsFlags(player, 0x1);
		SetInvActivated(player, bin, 1);
	}

Return;
#--------------------------------------------------------
end


As for the items.dat, you should have a line like this:

Code:
bacta   116   1 1  0x122  cog=flyitem.cog


The name of the bin is "bacta" because the first five letters of the item's name must match an icon name. So by calling the bin "bacta", I'm giving the item the bactatank's icon. The bin's ID number doesn't have to be 116, but make sure that you replace the 116 in the flyitem cog with whatever bin number you use.

The min and max of the bin are set to one because the bin must have an amount in it when it is available (0x20 bin flag).

The bin's flags (0x122) mean that the bin uses a hotkey(0x100), is available on startup(0x20), and is an item(0x2).

And the cog assignment tells the exe in which cog to call the activated and deactivated messages.

If you need any features added or have a question, post again. Glad to help. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.

[This message has been edited by SaberMaster (edited June 22, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-22, 11:19 AM #5
I dont know if that can be used with SBX3.1, is there a way to make it so that items.dat doesnt need to be touched?
2002-06-22, 2:58 PM #6
No, you have to use a bin in the items.dat. If SBX doesn't use all three of JK's free hotkeys, then you can add your item bin, and there won't be a problem - just change the bin number. But if SBX does use those hotkeys, you might use the hotkey of one of the original items like the fieldlight.

[edit] You will also need to add an entry for your hotkey in the jkstrings.uni. Search for "Activate16" in this file and you'll see a list of hotkey descriptions. The entries in this list must be in the same order as the hotkey-flagged bins in the items.dat.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.

[This message has been edited by SaberMaster (edited June 22, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-22, 4:29 PM #7
What would you suggest I do? It doesnt neeed to be an item, and SBX uses all hotkeys. I just want a fly toggle that works with SBX.

Clown made a SBX hack pack with some stuff like god and speed in items inventory, and that only uses cogs and bms.
2002-06-23, 5:10 AM #8
If you only want the toggle, and you don't need the hotkey, remove the 0x100 bin flag (to make it 0x22) and the item will appear in your inventory, but not use a hotkey.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-23, 10:27 AM #9
I don't know how flags and stuff work, can someone give do this? I never took the time to learn how JK works, I just picked up what file extention purposes are...

To be more clear on my origional intentions, a perfect product would be a fly toggle that I can access only by browsing my inventory (no hotkey), much like SBX3.1's saber damage toggle, motion trail toggle, and blade color cycling. I assume that this can be done by replacing an item, but I would like it to replace a key or something not commonly used in MP. I believe SBX uses some of the item_key cogs to use damage, motion trail, and color, so it cannot use one of those cogs. It must be compatable.

All help is greatly appreciated...

[This message has been edited by Spittor (edited June 24, 2002).]
2002-06-24, 2:31 PM #10
Alright, use the cog I gave you above and put this line in the items.dat:

Code:
bacta   120  1  1  0x22 cog=flyitem.cog


If bin 120 is used, change it to a bin number that isn't used. And change the 116 in the cog to whatever number you use.

That should work. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-24, 3:16 PM #11
I dont think I can edit items.dat, theres one in the SBX gob...
2002-06-25, 6:33 AM #12
You should edit the items.dat from the SBX gob. How are you running your patch? With Patch Commander, or are you using directories and the -path command?

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-25, 6:38 AM #13
Patch Commander, as I rarely play away from the zone.

How did Clown make his SBX god/speed hack without editing items.dat?
2002-06-25, 11:24 AM #14
Well, if Clown didn't edit the items.dat, then he must have replaced some of the original items.

Patch Commander is fine for playing patches, but for making/editing them, you should put the files in their proper directories and use the -path command.

Assuming you haven't done that: Create a folder in your JK dir called mod (or whatever name you want). In side this folder, create the cog, misc, ui, etc folders just as they appear in a .gob file. Create a shortcut to jk.exe and view it's properties. Add -path mod after the closing quotation marks of the shortcut's target.

Once you have that set up, extract the files from the SBX gob and put them in their appropriate directories. Then add the cog I gave you and add the new bin to the items.dat. When you're finished, create a new .gob with ConMan and drag the mod folder into ConMan's window.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-25, 3:20 PM #15
Well, replacing the origional items was my intent, as long as its a key or something.
2002-06-26, 3:42 PM #16
So what do I do to the above cog script to make it replace something?
2002-06-27, 8:33 AM #17
Decide which item you want to replace and rename flyitem.cog to whatever the name of the item's cog is.

If you replace an item with a hotkey, you'll have to modify the jkstrings.uni to change the text that appears in JK's hotkey settings.

If you replace an item that is not normally available, you'll have to add SetInvAvailable(player, bin, 1); to the startup message of the cog.

I would reccomend that you just add a new item instead of replacing one. If you're having a problem getting the new bin to work, just explain the problem. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-27, 2:54 PM #18
So, like this?

Code:
# item_bluekey.cog
#
# An item that enables the player to fly when activated.
#
# [SM]
#=====================================================#
symbols
int on local
int bin=116 local
thing player local
message activated
message startup
end
#=====================================================#
code
#--------------------------------------------------------
startup:
on = 0;
SetInvAvailable(player, bin, 1); 
Return;
#--------------------------------------------------------
activated:
player = GetSourceRef();
if(on)
{
on=0;
ClearPhysicsFlags(player, 0x2000);
SetPhysicsFlags(player, 0x1);
SetInvActivated(player, bin, 0);
}
else
{
on=1;
SetPhysicsFlags(player, 0x2000);
ClearPhysicsFlags(player, 0x1);
SetInvActivated(player, bin, 1);
}
Return;
#--------------------------------------------------------
end



I can't seem to copy your tabs...

[This message has been edited by Spittor (edited June 27, 2002).]
2002-06-28, 9:03 AM #19
Not quite. Change the 116 to 47, add SetInv(player, bin, 1); just below SetInvAvailable(), and make sure the name is item_keyblue.cog instead of item_bluekey.cog.

That should work.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.

[This message has been edited by SaberMaster (edited June 28, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-28, 12:07 PM #20
well, i tried this:

Code:
# item_keygreen.cog
#
# An item that enables the player to fly when activated.
#
# [SM]
#=====================================================#
symbols
int on local
int bin=47 local
thing player local
message activated
message startup
end
#=====================================================#
code
#--------------------------------------------------------
startup:
on = 0;
SetInvAvailable(player, bin, 1); 
SetInv(player, bin, 1);
Return;
#--------------------------------------------------------
activated:
player = GetSourceRef();
if(on)
{
on=0;
ClearPhysicsFlags(player, 0x2000);
SetPhysicsFlags(player, 0x1);
SetInvActivated(player, bin, 0);
}
else
{
on=1;
SetPhysicsFlags(player, 0x2000);
ClearPhysicsFlags(player, 0x1);
SetInvActivated(player, bin, 1);
}
Return;
#--------------------------------------------------------
end


but got a checksum error...

tried it hosting and couldnt move...

[This message has been edited by Spittor (edited June 28, 2002).]
2002-06-28, 12:16 PM #21
You changed the name. [http://forums.massassi.net/html/rolleyes.gif] Bin 47 matches the blue key, not the green key. The green key's bin is 51. Change the bin number or the name to get it to work.

[edit] Everyone in the game has to be using the same mod or their will be a checksum error.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.

[This message has been edited by SaberMaster (edited June 28, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-28, 2:34 PM #22
Oh, ok.

Well, I thought that didnt apply to cogs.

How do hax pass the checksum then?
2002-06-28, 8:13 PM #23
Ok... what you're asking for here is what's called a "hack." It's where you edit cogs in-game to give yourself an unfair advantage.

It's darned near impossible to hook up a game over IRC, and if you pull out a hack, the guy will kick you without question.

[This message has been edited by SaberMaster (edited June 29, 2002).]
***POST COUNT +1!***
2002-06-29, 3:54 AM #24
Chao, that wasn't really needed. I removed the offensive part of your message.

Quote:
<font face="Verdana, Arial" size="2">How do hax pass the checksum then?</font>


They don't. No one on the Massassi Cog Forum will help you with hacks. It seems you lied about your original intent; The information you need is on this page, use it if you will.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!