Jump to content

Photo

making a boss script


  • Please log in to reply
10 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 09 February 2019 - 08:05 PM

Heya everyone. recently i do wish to making my own boss script but it's very complicated... I wants to making the 'Gaia Moldorm. a giant moldorm that could 'splashing' out of the lava combos (using the Flag num 100 ) as the screens is shaking and then shoots some projectils to Link as the moldorm moves. Of course the moldorm would fly and then throws his 'tiny moldorm' and some time some boulders that explode in contact of the ground before it comes back. Of course i planning 2 types of the Gaia Moldorms: One that would uses any fire projectiles types and that would appears where the lava combo (Flag 100) is and if it 'splash' at the lava some fires would getting out of the lava combo, and the one that would uses ice projectiles types that freeze Link for some seconds and that the moldorm appears from the side screen at the horizontal or at the vertical but the moldorm would be more faster and i planning to making only one of those that explodes at it death.

Here's the script i did started to made but i'll needs some helps to making this one because i'll not be able to making a boss script alone by my own. (if you wish to modify it entierly i could understand this.)

 

ffc script GaiaMoldorm{
        void run(int enemyid){

        
        npc ghost = Ghost_InitAutoGhost(this, enemyid);
	Ghost_SetFlag(GHF_STUN);
	Ghost_SetFlag(GHF_CLOCK);

	int movementStyle = ghost->Attributes[0];
	int attack1 = ghost->Attributes[1];
	int attack2 = ghost->Attributes[2];
	int attack3 = ghost->Attributes[3];
        int attack4 = ghost->Attributes[4];
        int attack5 = ghost->Attributes[5];
	int size = ghost->Attributes[6];
	int fireSFX = ghost->Attributes[7];
	int fireSPR = ghost->Attributes[8];
	int flags = ghost->Attributes[9];


			Ghost_Waitframe(this, ghost);
	}
}

of course it's not completed but i do adding the most important things in there and there. 

so... is anyone who can help me in this please ? in my part i would setting the boss via the enemy editor. For this one i would thinking about using 10 or 20 segments.



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 10 February 2019 - 07:44 AM

Segmented enemies are about the most complex to script. if this is for 2.55, Venrob recently coded up some moldorm style npcs. Otherwise, it is out of my domain. I do not make complex ghost scripts: In 2.50.x, I typically hardcoded enemy behaviour in my global loops. Evan and Moosh can cringe at this, later.

In general, I no longer write any scripts or versions < 2.54.

All of my present scripts are dedicated to proving 2.55+.

For ice, using 2.55, you'd make an eweapon script, that on collision with Link, sets Link->Stun.

#3 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 10 February 2019 - 01:34 PM

Heya everyone. recently i do wish to making my own boss script but it's very complicated... I wants to making the 'Gaia Moldorm. a giant moldorm that could 'splashing' out of the lava combos (using the Flag num 100 ) as the screens is shaking and then shoots some projectils to Link as the moldorm moves. Of course the moldorm would fly and then throws his 'tiny moldorm' and some time some boulders that explode in contact of the ground before it comes back. Of course i planning 2 types of the Gaia Moldorms: One that would uses any fire projectiles types and that would appears where the lava combo (Flag 100) is and if it 'splash' at the lava some fires would getting out of the lava combo, and the one that would uses ice projectiles types that freeze Link for some seconds and that the moldorm appears from the side screen at the horizontal or at the vertical but the moldorm would be more faster and i planning to making only one of those that explodes at it death.

Here's the script i did started to made but i'll needs some helps to making this one because i'll not be able to making a boss script alone by my own. (if you wish to modify it entierly i could understand this.)

 

ffc script GaiaMoldorm{
        void run(int enemyid){

        
        npc ghost = Ghost_InitAutoGhost(this, enemyid);
	Ghost_SetFlag(GHF_STUN);
	Ghost_SetFlag(GHF_CLOCK);

	int movementStyle = ghost->Attributes[0];
	int attack1 = ghost->Attributes[1];
	int attack2 = ghost->Attributes[2];
	int attack3 = ghost->Attributes[3];
        int attack4 = ghost->Attributes[4];
        int attack5 = ghost->Attributes[5];
	int size = ghost->Attributes[6];
	int fireSFX = ghost->Attributes[7];
	int fireSPR = ghost->Attributes[8];
	int flags = ghost->Attributes[9];


			Ghost_Waitframe(this, ghost);
	}
}

of course it's not completed but i do adding the most important things in there and there. 

so... is anyone who can help me in this please ? in my part i would setting the boss via the enemy editor. For this one i would thinking about using 10 or 20 segments.

 

I see no reason to grab values from the in-editor enemy attributes (unless you want to use this enemy several times, with different configurations; but it doesn't seem like you want to do that). Why not set up the values directly in the script? Also, it'll probably be easier on you to have two separate scripts for the fire version and the ice version, since you want them to do fairly different things.


Edited by Jamian, 10 February 2019 - 01:35 PM.


#4 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 10 February 2019 - 06:39 PM

Well Evan2000 is not really able to takes requests at the moment as he told me and Moosh well let's say that he don't really takes requests anymore he never responds me when i try to ask him some request so i guessing that he stopping to takes requests or he cannot takes requests anymore i don't really know.



#5 James24

James24

    Adept

  • Banned
  • Real Name:James
  • Location:Australia

Posted 10 February 2019 - 09:20 PM

The situation with Evan is resolvable and perhaps you should speak with him in private though I warn you that you might not like his counter-suggestions.  I don't know about Moosh though - I never asked him.

 

Clearly, this is a huge problem for ZC.  Learning how to script is hard enough on its own.  Scripting large and complex bosses is a very difficult task and it takes a lot of time and effort for a newcomer to get up to speed on it.  Its little wonder why most new quests only have minimal scripting at best, say nothing about scripting custom bosses and such.  It would be much better if those who have mastered the skill continue to do it and tune it to the tastes of whoever is requesting it.  But why would they do that?


  • judasrising likes this

#6 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 11 February 2019 - 11:17 AM

i could ask him but even if i learn scripting myself it's almost impossible for me to making a functionnal script that would works. As you said it takes a lot of time. Time that i don't even have because some personnal problem that i always have and when i write script when i copy it it's never works the only way that a script works for me is paste it and that all. Altrough i'm a bit better with script since i can now combines global script without any problems now and that was the hardest part. 
I'm getting out of the subject, i could ask him or anyone else who knows about scripting if they could help me to 'learns' to scripting my own scripts. But i wonder: What type of script is the most easily to make ? the ffc script, the global script, or the items script ? 



#7 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 11 February 2019 - 01:38 PM

But i wonder: What type of script is the most easily to make ? the ffc script, the global script, or the items script ? 

 

They're not all that different, so it doesn't matter that much, but I'd recommend starting with ffc scripts. And I'd recommend you start small and work your way up, instead of jumping straight into ghosted enemies. Try writing a simple script that displays a message and plays a sound when the player enters a screen, for example. This was the first script I wrote. Since then I've scripted things like a random dungeon generator and a turn-based RPG engine, but it took me a few years to get there.



#8 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 11 February 2019 - 06:20 PM

ok i could try it i guess.



#9 James24

James24

    Adept

  • Banned
  • Real Name:James
  • Location:Australia

Posted 11 February 2019 - 10:12 PM

I wouldn't suggest learning to script unless you have a brain for logic, maths and problem solving.  I think scripting was put in more for those who had the ability to do so and wanted to do it.  If you don't know how to script then maybe its just not something for you.  Obviously your quest won't be as complex as those who know how to script but the cost and time savings to you as the author would be tremendous.  If players rate it badly or don't play it because there are no scripted bosses then that's just something you'll have to live with but in return you get a massive time and cost saving.  Evan might be open to helping you, but its - complicated and you might or might not like his answer.

 

As for the difference between ffc, item and global scripts, I would say its not that much different.  ffc scripts activate on a particular screen.  Item scripts activate when the player picks up the item.  Global scripts work everywhere.  But all still require intimate know how of scripting.



#10 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 13 February 2019 - 10:36 PM

I wouldn't suggest learning to script unless you have a brain for logic, maths and problem solving.

lmao I just bash my head against the compiler and steal smarter people's solutions off of stack overflow until something works. The key is to not dream big but dream a little bigger than you are at the moment.


  • Anthus likes this

#11 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 01 March 2019 - 12:38 PM

lmao I just bash my head against the compiler and steal smarter people's solutions off of stack overflow until something works. The key is to not dream big but dream a little bigger than you are at the moment.

I first started coding because of a project at school (not like schoolwork, an actual project for school administration) which was using google forms/sheets. One of the add-ons that was necessary for it to work stopped working over the summer. In order to fix this, I needed to learn JavaScript, and fast. I solved the entire problem using nothing but the power of Google (and like, a month and a half of improving it until it worked properly). Most of the time, Google is a good solution; except for ZScript.

 

I'd recommend if you have trouble with any of the basic stuff to try learning a different language (C++, for instance), at least a little bit- then move into ZScript. Having the coding basics down is one of the most important things going in.

 

Beyond that, `zscript.txt` `std_constants.zh` and `std_functions.zh` are your friends. They contain all forms of things for scripts to use (though in 2.55, you also want to check `ZScript_Additions.txt`, as all the new 2.55 stuff is there).

 

Beyond that, there's always an amount of bashing your head into a wall with coding. It can be frustrating, and you may want to give up. This happens even to the most experienced of coders; you always can run straight into a brick wall in coding. But, through perseverance, you can make some pretty awesome stuff.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users