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.

ForumsDiscussion Forum → I need help with this!
I need help with this!
2010-10-03, 6:02 AM #1
I know this is an improper location for this thread but nobody will answer my simple little question, I posted this in JKhub.net and in the cog forums below and of course nobody will respond. I dont want to be a whining little wuss, but I know that there is some cog experts here and I would greatly appreciate if someone could give me 10 seconds of their time. You will definitley be mentioned in my credits when this game project is released, I'll pay you if it comes down to it (OK never mind, maybe thats being too desperate).

Does anybody know if there is a cog or can they alter this cog script: turncoat_ai.cog, to where the attacking ai that is attacking the known target will not fire or attack you or the walkplayer after it has destroyed its designated tartget. I would love you guys if someone could help me (Im not gay):P But really I know that the discussion part of the form is unappropriate, but I had to do this because I am giving myself a personal deadline for PJNS.

If this option is not possible with the nature of AI operations or functions then I understand, I'll just do something else. Thank you.
He who controls the spice controls the universe-
2010-10-03, 7:14 AM #2
Change the to your team and it will attack all your enemies. MotS has friendly AI that might help you get started.
2010-10-03, 10:47 AM #3
Thank you very much JM, I'll research that a little more. Im going to have to learn how write cog scripts someday if I want to continue to create interesting levels, but I cant make cogs right now to save my life.
He who controls the spice controls the universe-
2010-10-05, 6:46 AM #4
Originally posted by Darth Dan:
Im going to have to learn how write cog scripts someday if I want to continue to create interesting levels, but I cant make cogs right now to save my life.


But.... why????
"Nulla tenaci invia est via"
2010-10-05, 7:11 AM #5
You're better off learning something useful.
Quote Originally Posted by FastGamerr
"hurr hairy guy said my backhair looks dumb hurr hairy guy smash"
2010-10-05, 7:36 AM #6
Originally posted by KOP_AoEJedi:
You're better off learning something useful.


That's ****ty advice. If you don't know cog but it interests you, learn it.
2010-10-05, 8:40 AM #7
Originally posted by KOP_AoEJedi:
You're better off learning something useful.


no
"it is time to get a credit card to complete my financial independance" — Tibby, Aug. 2009
2010-10-05, 9:41 AM #8
If his motivation is to learn how to be a programmer, COG is a poor choice. If his motivation is to mess around with an old game, COG is fine.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-05, 4:27 PM #9
On the contrary, being a "programmer" typically involves inheriting ****ty legacy code bases full of stupid designs and thus difficult to work on. COG would be a perfect choice for that.
2010-10-05, 4:30 PM #10
I don't think giving someone the complexity and unknowns of that kind of system is a very good way to learn how to program
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-05, 5:37 PM #11
Originally posted by Emon:
If his motivation is to learn how to be a programmer, COG is a poor choice. If his motivation is to mess around with an old game, COG is fine.


I have contemplated about learning the field of game programming or something like that in the Computer world, but I hope that Im not too old to be accepted in that career, if I choose that path. Also I hope that there is something far better than the Cog script programming because I think it SUCKS!
He who controls the spice controls the universe-
2010-10-06, 4:21 AM #12
If you haven't solved it with the team mode, post up and I'll give the cog a shot. (I am ruuuusty though)
2010-10-06, 10:39 AM #13
Originally posted by Darth Dan:
Also I hope that there is something far better than the Cog script programming because I think it SUCKS!


There isn't. Sorry. COG is actually at the pinnacle of feature-rich and easy-to-use languages.
"it is time to get a credit card to complete my financial independance" — Tibby, Aug. 2009
2010-10-06, 11:21 AM #14
is COG bacically C++ on sterioids and lots of :downs:
(JKLE_Cougar) from JK MP Community
discord.me/jediknightdarkforces2
2010-10-06, 11:31 AM #15
No it isn't. COG has C-style syntax but the similarities end there. All of the features that make C++ unique are not in COG at all.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-06, 11:33 AM #16
COG more like Crap of GBK LOL ZLLÖZL bink-
Star Wars: TODOA | DXN - Deus Ex: Nihilum
2010-10-06, 12:43 PM #17
Originally posted by Emon:
No it isn't. COG has C-style syntax but the similarities end there. All of the features that make C++ unique are not in COG at all.


That is what I heard from listening to nuts in #jk that it was kind of based on C++ but really screwed up
(JKLE_Cougar) from JK MP Community
discord.me/jediknightdarkforces2
2010-10-06, 12:45 PM #18
Pretty much everyone in #JK is retarded
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-06, 3:33 PM #19
Am I the only one that thinks COG is cool?
2010-10-06, 3:45 PM #20
Maybe that's nostalgia talking? I honestly don't know much about COG other than editing a few scripts back in the day but I do remember it pissing me off a few times.
? :)
2010-10-06, 3:45 PM #21
It is cool, it's just not a good way to learn how to program.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-06, 5:40 PM #22
No, it's not cool. It's not a good idea to get a bunch of game programmers to design and write a programming language. That sort of thing takes a very different set of skills. COG is actually far better than it should have been.

The important thing is that it was adequate for producing the scripts for the game it was intended for. It was never strained during the development of JK, and therefore its weaknesses didn't really matter too much. If anything was really too hard to do in COG, it would probably have been cut from the game.

This reasoning doesn't apply to the user-made levels that have been made after JK was shipped, of course.

If you want to make cool and interesting levels for games that might lead into doing this sort of thing for a career, then COG probably isn't the best thing to learn, and you'd do better shifting to editing a game that uses a more modern scripting language. I believe LuaScript (or something like that) is used in a lot of games nowadays.

On the other hand, as Brian says, if you're just doing this for fun, go for it.
2010-10-06, 5:59 PM #23
So far I found this cog to be the best with what Im arranging in the last part of the game. Unfortunately you have to touch the friendly ai in order to activate its alliance with you. I wish that there was a way to convert the cog into entering sector instead of touching the ai in order to activate it. I tried to change the cog and I had no luck.


# Jedi Knight COG Script
#
# 00_friendly.cog
#
# Actor designated by 'friendly' will assist the player once touched.
# Passive_ai is the actor's AI when not attacking.
# Angry_ai is the actor's AI when battling an enemy.
# I'd suggest pednarsh.ai or something of the sort for passive_ai and then
# use one of the actor's original AI files for it's angry_ai.
#
# Example: for a friendly stormtrooper, set the passive_ai to pednarsh.ai and
# the angry_ai to stdefault.ai.
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved


symbols

message startup
message touched
message killed
message pulse

thing friendly mask=0x408
thing player local
thing enemy local

ai passive_ai
ai angry_ai

end

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

code

startup:
player = GetLocalPlayerThing();
AISetClass(friendly, passive_ai);
return;

touched:
if(GetSourceRef() != player) return;

SetPulse(1.0);
return;

killed:
SetPulse(0.0);
return;

pulse:
enemy = FirstThingInView(friendly, 170, 12, 0x4);

player = GetLocalPlayerThing();

if((enemy == friendly) || (enemy == player) || (!enemy))
{
AISetClass(friendly, passive_ai);
return;
}

AISetClass(friendly, angry_ai);
AISetFireTarget(friendly, enemy);
AISetMoveThing(friendly, GetThingPos(enemy));
AISetLookPos(friendly, GetThingPos(enemy));
AISetMode(friendly, 0x202);
AIClearMode(friendly, 0x1000);

return;

end

If you Guys know if there is something like this please let me know where to find it, or if there is a way to change the cog, I really appreciate it guys!


edit: I almost used the max_ cog, but he only attacks spontanously like a dumbass.
He who controls the spice controls the universe-
2010-10-07, 4:03 AM #24
Try below, I'm guessing you posted the original cog, and not one of the guinea-pig ones?

# Jedi Knight COG Script
#
# 00_friendly.cog
#
# Actor designated by 'friendly' will assist the player once touched.
# Passive_ai is the actor's AI when not attacking.
# Angry_ai is the actor's AI when battling an enemy.
# I'd suggest pednarsh.ai or something of the sort for passive_ai and then
# use one of the actor's original AI files for it's angry_ai.
#
# Example: for a friendly stormtrooper, set the passive_ai to pednarsh.ai and
# the angry_ai to stdefault.ai.
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# Finally Ford built an American car for us!
# Taurus!


symbols

message startup
message entered
message killed
message pulse

thing friendly mask=0x408
thing player local
thing enemy local

sector fight

ai passive_ai
ai angry_ai

end

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

code

startup:
player = GetLocalPlayerThing();
AISetClass(friendly, passive_ai);
return;

entered:
if(GetSourceRef() != player) return;

SetPulse(1.0);
return;

killed:
SetPulse(0.0);
return;

pulse:
enemy = FirstThingInView(friendly, 170, 12, 0x4);

player = GetLocalPlayerThing();

if((enemy == friendly) || (enemy == player) || (!enemy))
{
AISetClass(friendly, passive_ai);
return;
}

AISetClass(friendly, angry_ai);
AISetFireTarget(friendly, enemy);
AISetMoveThing(friendly, GetThingPos(enemy));
AISetLookPos(friendly, GetThingPos(enemy));
AISetMode(friendly, 0x202);
AIClearMode(friendly, 0x1000);

return;

end
2010-10-07, 6:24 AM #25
Thanks a bunch Ghorg I bet it will work. I cant remember where I found the cog, but I hope its not a guinea pig. I'll let you know if it works or not.
He who controls the spice controls the universe-
2010-10-07, 8:31 AM #26
Originally posted by Andrew L:
That is what I heard from listening to nuts in #jk that it was kind of based on C++ but really screwed up
Pretty much everyone in #JK is retarded

It was worth saying again.

COG was crudely based on INF. First they added variables and simple arithmetic commands. Eventually they figured out that they needed something more robust so they wrote a lame-ass C style expression parser in an afternoon using Bison, and tacked it into their existing INF parser wherever it would fit.

That's why you need to have two totally different parsers in order to parse COG.

Originally posted by Giraffe:
No, it's not cool. It's not a good idea to get a bunch of game programmers to design and write a programming language. That sort of thing takes a very different set of skills. COG is actually far better than it should have been.
Counter-example: UnrealScript. The implementation is a bit hoary (hand-written recursive descent compiler and some features obviously written by summer interns,) but the language design in general is very solid.

Any decent computer science course is going to teach you the basic principles of language design, compiler construction and software engineering. COG sucked because the JK developers were bad engineers, not because they were game programmers. This is also why JK's physics sucked, JK's graphics sucked and JK's gameplay sucked. There were and are plenty of brilliant engineers in game development: see EASTL for one of the more obvious examples.
2010-10-07, 9:27 AM #27
What does JK's gameplay have to do with bad engineering?
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-07, 10:24 AM #28
Well at the time we didn't think JK's gameplay sucked or we wouldn't be here.
"Nulla tenaci invia est via"
2010-10-07, 11:48 AM #29
It certainly wasn't perfect but it had a lot of cool stuff, and certainly some fantastic level design.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-07, 4:38 PM #30
I'm not here because JK had good gameplay. I'm here because in 1997 I was a slavering Star Wars fanboy who didn't know any better.

JK's controls were terrible and usability engineering would have told them. The JK team was at least 10 years behind the rest of the world in terms of software engineering.
2010-10-07, 4:39 PM #31
Indeed, it takes way too long to set up JK's controls.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2010-10-07, 7:27 PM #32
Originally posted by Jon`C:
I'm not here because JK had good gameplay. I'm here because in 1997 I was a slavering Star Wars fanboy who didn't know any better.

JK's controls were terrible and usability engineering would have told them. The JK team was at least 10 years behind the rest of the world in terms of software engineering.


I was a slavering Star Wars Fanboy since 1977 (very young boy at that time) and the luster is now slowly fading away, but I will always love Star Wars even despite George Lucas ****ing it up sometimes.

I have played games that were far worse than JK, but I cannot name them all, but they were considered popular games.
He who controls the spice controls the universe-
2010-10-08, 2:14 PM #33
The only fair way to judge any game is, "Did you like it at the time?"

↑ Up to the top!