Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 12/12/07 20:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

'One Tiny Mistake' - IfD's first script!

Yes, it has been a while since I posted on here. I told myself that until I actually made a working script for Oni, there was no point in 'talking the talk', so to speak.  And so, here it is - 'One Tiny Mistake'.

I've put a Readme into the folder, but basically this script is for level 2 (MMP). Konoko and friends walk into Musashi to do their job, but konoko's a rookie, and things get out of hand rapidly.

Being my first script, I debugged it myself (so far I think I've knocked off all the unknown bugs), and relied on the knowledge and scripts of others to reference with. Of course there's a lot more I would like to do with this, but I don't have the skills yet.

Try it out and tell me what you think smile


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#2 12/12/07 21:12

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: 'One Tiny Mistake' - IfD's first script!

The Konoko in the intro cutscene is priceless smile
Maybe you should have kept Barabas's talk too.
I'll help you out with the known bugs ASAP... wink

Last edited by geyser (12/12/07 21:12)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#3 12/12/07 22:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

Thanks for the help geyser. I was thinking about it when I planned the script, and it seemed fitting and all, with the idea of being the 'rookie'.

I was wandering though, do you know if the dialog files for the characters are globally-based or level-specific? I'd love to use the "Let's get it on!" line  from level 3.


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#4 12/12/07 22:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

Very sweet ^_^

Just testing out my debugging skills...

Though the cutscene issue is (somewhat) easily fixed. You forked all the savepoints to the same function...either make a new function with the neccesary items\spawns...or jsut add a few If statements ^_^

Captialize Barabas's name, and he should spawn\teleport properly

Fork the end function in the beginning, and put the wait part in there

---is that what went wrong?---

And (I thought) sounds are level based, unless you install the 7th edition patcher...

Last edited by Gumby (12/12/07 22:12)


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#5 12/12/07 22:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

The actual problem with Barabas is that in Level 2, he has no apparent ai. I then tried a chr_set_class command, but for some reason it wouldn't work. Once I figure out what went wrong, it's but a simple matter of uncommenting the appropriate lines, adding a WMC, and sending off the character to act as a boss.

On that, does it seem a bit easy to any of you? If I make all the characters aware of Konoko, you end up getting shot to death before you can blink, so I spread ou the attack targets of the enemies.


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#6 12/12/07 22:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

yeah...it does that with cutscene characters...let me check something...

Why don't you just disarm the majority of the troops? guns are annoying...


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#7 12/12/07 23:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

I might, but even then I'd keep some of the gun-armed ones up on the walkway, just so they can attempt to hit you without gunning down 10 allies in front of them.


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#8 12/12/07 23:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

Wellll...I can make Barabus moveable and everything...but he wont move...and ai2_followme makes him move half a step...but I removed his passive state, activated his active state, and everything I can think of...


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#9 12/12/07 23:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

Odd...his behavior is set to "Hold and Fire"

How to change that....hmm....it should be Barabbus Shoot/Melee...O_o

---

sad

http://wiki.oni2.net/OBD:BINA/OBJC/CMBT#Behavior_part

Resource hacking is the only way? >_> that sucks...

I was going to suggest spawning a Muro and changing it (so you still get high hp), but Muro has the same stupid profile...I guess you are going to have to loop a wait_chr_health function and a chr_full_health function...I'm too tired right now to figure out changingthe class..

Last edited by Gumby (12/13/07 02:12)


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#10 12/13/07 02:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

Well, I've got absolutely zero binary skills, so that's out of the options I've got.  I'll work to try and fix the chr_set_class command, so at least we can have Barabas running around the place, instead of sitting in one place like a rock.


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#11 12/13/07 02:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

In the script, this is the planned command for the change to Barabas:

    chr_set_class cruel_striker_1 barabas

I'm referencing of Geyser's 'suprise' neuro script for that command, as it's one of the few scripts I've seen to use it.  Regardless, is that line of code correct?


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#12 12/13/07 03:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

it looks right...even though he will have low hp ^_^


var int cnt=0
If cnt < 3
{
chr_wait_health cruel_striker_1 10
chr_full_health cruel_striker_1
cnt = cnt + 1
}

Add that nice bit o code...it will give you (somewhere) around Barabas's health...but the colored flashes will repeat...I'll let you figure out how to fix that (you have to learn somehow ^_^)


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#13 12/13/07 03:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

Well, I've just got a big fat chr_set_health command for Barabas (and your partners - they need all the help they can get).  I'll keep that code in mind though, and I'll try to implement it. Pehaps you'll find it on the next release?


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#14 12/13/07 05:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

Here's a rundown of what's changed in the script since the original:

- I've changed the spread of the weapons in between the waves, as to avoid crowding all the guns in one spot. I also took out a few of the guns, and changes the Scram Cannon to another Plasma Rifle.

- Added Barabas's line into the cutscene, and his portrait. Also gave the 'Barabas' goon a WMC, for kicks.

Of course, there are a few issues still to be fixed before I release it again.

1. I still need to fix the chr_set_class command to shapeshift the goon to Barabas (my script line above is incorrect, like the others I've tried).  Perhaps a quick chr_focus command beforehand??? Geyser specifically  might be able to help with this particular problem, as he's written most of the scripts with a chr_set_class command I've seen in action.

2. I'd like the camera to focus on 'Barabas' whilst he give his one line. It fixes up the angle deficiency in Konoko's sweeping camera movement, and draws attention away from the Receptionist's awkward stand animation that can still be seen in the sweeping camera.

3. Trying to get the enemies to spawn behind the ground doors, then run into the reception room. Early tests incdicated that the AI, in its stupidity, kept getting stuck behind the walls, making them easy targets for the player.

4. Other minor tweaks, specifically to do with message timing.

But seriously, thanks for the help! It's much appreciated.


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#15 12/13/07 07:12

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: 'One Tiny Mistake' - IfD's first script!

Your Konoko is all the better than the original as the original doesn't even look at the secretary...
Whereas you materialize the conversation most definitely. It's the best cutscene in Oni so far smile
"Let's get it on!" is originally local, but the Edition globalizes all the sounds, you can count on it.

Gumby's guess about capitalization of Barabas's name is wrong. Barabas is seldom capitalized.
Also, it is is true that the cutscene Barabas has no melee profile, so he'll be a worthless opponent.
(he'll still be able to shoot his WMC or retreat/regenerate when hurt, but - no melee whatsoever)
Having to hack him in binary does not suck. You have to remember that BSL is mere commodity.

I would certainly appreciate having a few savepoints here and there, and why not all 10 of them.
It's good practice to allow the users to skip the intros, even priceless ones, and get instant action.

I didn't think that was easy at all. I ended up using the elderrune cheat to live through the massacre smile
I love the gunners on the walkway. You could also use the front door for some ally reinforcements...
It would be a bit overkill to give the enemies an SBG, for instance, but to your friends... why not?


Now, as for the main bug's fix: you didn't pay attention when peeking at the "surprise" script smile
chr_set_class doesn't refer to characters by name, but by ID (attributed in order of spawning).
If Barabas is, say, the 5th character to enter the level, you just use chr_set_class 5 barabus
Note, however, that chr_set_class will only work on PC retail. Same for chr_focus and a few others.

In order to focus on Barabas (or pseudo-Barabas) I would use one of the preset camera positions.

Enemies should have no problems with running in through the doors, since they do it in the cutscene.
If active AI have trouble pathfinding there, you can always make them passive like the cutscene ones.
I see no reason why they should get stuck in walls though, and I'm sure you will be able to fix that tongue

Gumby's suggestion is not bad at all. You could simply have Barabas regenerate at the end of every wave.
When and if all the goons of a wave are dead and Barabas is still alive, he gets fat health and more goons.
That's the perfect moment to save the game. And don't forget to make him say "Stronger and stronger" smile

As for keeping your teammates alive across savepoints, that's a tricky one. Tantir's been there before...
Have a look at this one, see if it's worth it: http://oni.bungie.org/community/forum/v … php?id=130
You can almost certainly forget about previously spawned friends and just add friendly waves on SP load.

My suggestion is to use victim_mansci_1 (Dr. Kafelnikov) as the pseudo-Barabas: he has 150 base health.
You can always pretend that he's in fact the evil genius Dr. Bertram Navarre, and thus give him gadgets...
Be sure to use ai2_noncombatant victim_mansci_1 0 and ai2_neutralbehavior victim_mansci_1 none
For PC folks, just shapeshift him to Barabas. For Mac folks, leave him in as a (very evil) male scientist smile

One problem with victim_mansci_1 is that he will only be using basic fighting techniques (like, no Earthquaker).
Maybe it's best if you force Barabas to do the Earthquaker at very specific moments the player could anticipate.
That would still make it hard enough to go for Barabas before killing off his team. Dissuasive either way, sorta.
Of course, killing off an enemy wave is not recommendable since it spawns further waves and heals the boss.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#16 12/13/07 09:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

All chr_set_health will do (If made to mor than the base hp) will give Barabas overpower, and thus will slowly drain+make Barabus even tougher (in a way)

Geyser, making him regen to full health brings up something...if you don't defeat him in the first round, why would you be able to defeat him in later rounds, when he regens and you don't...

I wishwe had a chr_heal...or a useful chr_health


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#17 12/13/07 21:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

I'm at work as I type this, so I'm going to be brief (I shoudn't have internet access, let alone be on this forum:P)

With the chr_set_class command, does that include Player 0 (Konoko) in it?  The listed characters in the intro to spawn are:

1. Receptionist (the uber haxxorz she is, getting everyone to bash you. Well, Konoko gets what Konoko deserves...)

2. & 3. Your partners. I've set their health at a ridiculous 600, and made them unstoppable, and they still die horribly everytime I play:/

4. & 5. The two strikers who come in through the right door. No further comment.

6. The 'Barabas' dummy.  I've got the PC retail version, so I'm not going to use the victim_mansci_1 model as a base.  Also, the striker model I'm currently using is capable of the Striker Headbutt, so it can perform the Earthquaker move.  However, I'll add a Mac set of code that can be switched in (they'll get a mad scientist, with alternate dialogue, sorry:P)

Thus, would it be chr_set_class 6 barabas or chr_set_class 7 barabas?


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#18 12/13/07 22:12

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: 'One Tiny Mistake' - IfD's first script!

At any moment you can type chr_who to know what the ID of a character is.
Konoko's ID is 0, so in your example you should use chr_set_class 6 barabus
Note that it's "barabus" and not "barabas". They love misspelling Barabbas smile

@ Gumby: chr_poison doesn't work as elderruning (yet), so don't try it (yet) smile
chr_health actually exists on PC and does about the same as chr_set_health...
Just as for Barabas's normal regeneration, it's not a good idea to let him regen.
Instead you should try and defeat him somewhere between two regenerations.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#19 12/14/07 01:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

What I would suggest is ( a bit complicated) have Barabus do his stronger animation, and THEN heal, and set the code that makes it so if he is interrupted in his healing, he doesnt get healed...but thats probably more work than its worth tongue

I know what chr_health does ^_^ seems useless to me...why did they put in the same thing twice? Like freeze\passive\takecontrol\whatever (yes, they do have slightly differnet functions. I'm sure)

I won't explode from waiting (yet) ^_^


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#20 12/15/07 02:12

Im_New
Member
From: Singapore
Registered: 12/15/07

Re: 'One Tiny Mistake' - IfD's first script!

how come mine doesnt work?


Konoko:Im Kicking ur @ss
Barabus:Never....ahhhh help me im falling *pulls his string to trust his jetpack*
Barabus:*SNAP!* noooo

Offline

#21 12/15/07 13:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

are the origional scripts still in the folder? Plave them in a new folder...


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#22 12/16/07 05:12

ItemfinderDeluxe
Member
From: Canberra, Australia
Registered: 11/12/07

Re: 'One Tiny Mistake' - IfD's first script!

I'm working on the next release of this script, and it's coming along nicely. However, I have a simple question to ask.  I'm using the following function:

func void RafterEnemy (string name, bool reset, string weapon, int teleport, string target) {

    ai2_spawn (name)
    chr_inv_reset (name, reset)
    chr_giveweapon (name, weapon)
    chr_teleport (name, teleport)
    ai2_makeaware (name, target)

}

That function turns into the following statement:

RafterEnemy plasma_striker_1 1 w3_phr 43 partner_cop_1

The question - How do I incorporate chr_givepowerup plasma_striker_1 cell 5 into the above function, and how do I add said line into the statement?


TCTF SWAT: Striker, you're under arrest.
Striker: H4h, y0u c4n'7 570p m3!!!
TCTF SWAT: Damn it, learn to spell!!!
CURRENT PROJECT - 'Nemesis' V1.0 Released

Offline

#23 12/16/07 06:12

s10k
Member
Registered: 01/14/07
Website

Re: 'One Tiny Mistake' - IfD's first script!

Nice for the first script.

Offline

#24 12/16/07 11:12

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 'One Tiny Mistake' - IfD's first script!

You need two (or one, if all you plan on giving is cells) more arguments...they can probably go at the beginning, as you can choose to give 0 cells to someone


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#25 12/16/07 14:12

Tantir
Member
From: Cracow
Registered: 06/10/07

Re: 'One Tiny Mistake' - IfD's first script!

Hmm, great cutscene. wink Good fight, and many enemies - I like it wink

Offline

Board footer

Powered by FluxBB