Author Topic: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)  (Read 269459 times)

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #870 on: April 07, 2013, 09:09:22 PM »
It crashes before the script starts tho.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #871 on: April 07, 2013, 09:13:00 PM »
Also, using wait as the function name is preferable to Wait, because If I remember correctly, It may clash with an event function named Wait.
Correct. Wait with a capital W is a function used in dialogue events.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #872 on: April 07, 2013, 09:20:24 PM »
Correct. Wait with a capital W is a function used in dialogue events.
But I don't have diologue...im getting it to work though. I have many different problems :D
Edit: I fixed it!,!!!!,!!!,!,
« Last Edit: April 07, 2013, 10:13:00 PM by Qwertyzxcv »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #873 on: April 13, 2013, 02:45:42 PM »
New Question:

How can you allow grazing during player bombs? Is it just that having invincibility turns off grazing? If so, what ways are possible to obtain supergrazing effects?

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #874 on: April 13, 2013, 07:23:41 PM »
Invincibility turns off grazebox, yes.

GetEnemyShotCountEx(x, y, radius, type) can "work". type would likely be ALL. However, since there's no way to retrieve the individual bullet ids to compare for the next frame, this method basically grazes every possible bullet on every frame, creating a situation of absurd grazing that doesn't work the same as usual. ph3 fixes this lol
There was probably a better way, but I can't recall.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #875 on: April 13, 2013, 08:20:22 PM »
One way could be to have invisible object bullets with no hitbox that activated a graze effect depending on how close the player is to it. You know, manual hitbox via:
Code: [Select]
if(GetPlayerX<Obj_GetX(ID)+(size) && GetPlayerX>Obj_GetX(ID)-(size) && GetPlayerY<Obj_GetY(ID)+(size)  && GetPlayerY>Obj_GetY(ID)-(size)){Do stuff;}
where Do stuff; could be something like:
Code: [Select]
if(counter==0){
AddGraze(1);
Spawn_GrazeEffectObject;
counter++;}

This way would probably create lots of lag though and is probably not the best way either, just the only thing I can come up with. (The biggest problem would probably be that the bullets had to have the exact same movement pattern as it's parent bullet, unless it is the "death bullet/laser" itself that uses this code.)

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #876 on: April 13, 2013, 08:48:24 PM »
One way could be to have invisible object bullets
hf with that

You can't even script up your own collision for graze because you can't get bullet object IDs. You could technically get around that by having all bullets within your pseudo-graze collision area increase your graze and then delete all the bullets within the same area, but that's a really dumb method and doesn't make much sense.
« Last Edit: April 13, 2013, 08:53:48 PM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #877 on: April 13, 2013, 11:12:28 PM »
hf with that

You can't even script up your own collision for graze because you can't get bullet object IDs. You could technically get around that by having all bullets within your pseudo-graze collision area increase your graze and then delete all the bullets within the same area, but that's a really dumb method and doesn't make much sense.

...Looks like I'll give up on this one then. Unless... a manual invincibility function? Something that replaces SetInvincibility?

Edit: Another question: If I want to make a frame for Danmakufu, how should I make it so that score data, bomb count, etc. are still going to show? The only examples I know where it's worked the way I wanted are Victini's script, Shockman's Mima, and Puremrz's Juuni Jumon. Mima and Juuni Jumon... are indecipherable to me. I wouldn't mind doing something similar to CtC or Phantasm Romance, but how exactly would it be done? A 640 x 480 frame, I mean.
« Last Edit: April 13, 2013, 11:28:58 PM by Sparen »

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #878 on: April 14, 2013, 08:05:23 AM »
Edit: Another question: If I want to make a frame for Danmakufu, how should I make it so that score data, bomb count, etc. are still going to show? The only examples I know where it's worked the way I wanted are Victini's script, Shockman's Mima, and Puremrz's Juuni Jumon. Mima and Juuni Jumon... are indecipherable to me. I wouldn't mind doing something similar to CtC or Phantasm Romance, but how exactly would it be done? A 640 x 480 frame, I mean.

To make your own frame, just put your image in a folder named "img" next to your danmakufu exe. If you don't have one, create one. It's kind of a way to replace the graphics danmakufu uses (In my thread I for example put a download link for new player character graphics using the "img" folder :3 ).

I'm trying myself to make custom frame texts/numbers/lives/bombs and in v0.12m, you basically just does this:
Code: [Select]
SetDefaultStatusVisible(false); //Deletes the original frame objects in v0.12m
FrameEffectObject1;
FrameEffectObject2;
FrameEffectObject3;
etc.

Just use layer 8 for the effect objects for them to show up.

EDIT: Frame I use added, which comes from the CtC files.
« Last Edit: April 14, 2013, 08:21:24 AM by Darkness1 »

SusiKette

  • @MainLoop { yield; }
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #879 on: April 14, 2013, 01:04:22 PM »
Is it possible to make enemy scripts to not to be listed in the "Single" script menu? It's kind of annoying (especially when you can't "play them", you just get an error message)
Also, does anyone know if there are any custom Reimu/Marisa players for danmakufu that has different sprites than the default players, but has same fire power, moving speed, bombs etc.?

EDIT: Since it has been so long that I have made enemy scripts I have forgotten how to make them (the stage script that had those enemies doesn't exist anymore) and I can't find enemy scripting tutorials at all.
« Last Edit: April 14, 2013, 01:17:40 PM by Yukkuri_Yukkuri_Yukkuri »

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #880 on: April 14, 2013, 01:53:16 PM »
Quote
Is it possible to make enemy scripts to not to be listed in the "Single" script menu?
I guess it would be to use .dnh files instead of .exe files?

Quote
Also, does anyone know if there are any custom Reimu/Marisa players for danmakufu that has different sprites than the default players, but has same fire power, moving speed, bombs etc.?
You could try checking my thread :3. It is no custom players tho, but a fix that changes the sprites for the danmakufu players to ZUN sprites. Look at this for an example: http://www.youtube.com/watch?v=kNjaA9w_UUw

Quote
and I can't find enemy scripting tutorials at all.
Really? It can be found easily in the sticky. Look here: http://www.shrinemaiden.org/forum/index.php/topic,865.0.html  ~Go to "How to make Familiars!"

EDIT: my own question here now. How do I create common data storage files for Highscore? How would I use them properly? fixed
« Last Edit: April 27, 2013, 10:12:25 AM by Darkness1 »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #881 on: April 14, 2013, 02:15:01 PM »
Is it possible to make enemy scripts to not to be listed in the "Single" script menu? It's kind of annoying (especially when you can't "play them", you just get an error message)
Also, does anyone know if there are any custom Reimu/Marisa players for danmakufu that has different sprites than the default players, but has same fire power, moving speed, bombs etc.?

EDIT: Since it has been so long that I have made enemy scripts I have forgotten how to make them (the stage script that had those enemies doesn't exist anymore) and I can't find enemy scripting tutorials at all.

1) Don't put 'Single' or simple don't put the header. the latter is used very often for non spells
2) Darkness1 posted new skins, like... yesterday.
3) There are two places: http://www.shrinemaiden.org/forum/index.php/topic,6181.msg345023.html#msg345023
https://sites.google.com/site/sparensdanmakufututorials/other-dnh-tutorials

The first is located in a sticky here on RaNGE. So... yeah. The latter is a list I compiled.

To make your own frame, just put your image in a folder named "img" next to your danmakufu exe. If you don't have one, create one. It's kind of a way to replace the graphics danmakufu uses (In my thread I for example put a download link for new player character graphics using the "img" folder :3 ).

I'm trying myself to make custom frame texts/numbers/lives/bombs and in v0.12m, you basically just does this:
Code: [Select]
SetDefaultStatusVisible(false); //Deletes the original frame objects in v0.12m
FrameEffectObject1;
FrameEffectObject2;
FrameEffectObject3;
etc.

Just use layer 8 for the effect objects for them to show up.

EDIT: Frame I use added, which comes from the CtC files.

I got it  to work correctly with the .img folder, but it seems that if I want it to work with individual scripts, I'll have to do it the long way with effect objects. Thanks (spent an hour learning Victini's stage frame code~)
« Last Edit: April 14, 2013, 02:18:02 PM by Sparen »

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #882 on: April 17, 2013, 02:53:15 AM »
So, I have so many projects in mind. But I have a problem.
How, do I make the default lifebar for bosses to disappear. I know how to make a lifebar, I just don't know how to replace the default one.
Also, how do I implement a function that will let me do what
Code: [Select]
#ScriptNextStepdoes, except to the new lifebar. I've seems many examples but I just can't comprehend without explanation.
Examples include:
Juuni Jumon
Grovyle script
Currently a normal player

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #883 on: April 17, 2013, 08:41:57 PM »
So, I have so many projects in mind. But I have a problem.
How, do I make the default lifebar for bosses to disappear. I know how to make a lifebar, I just don't know how to replace the default one.
Also, how do I implement a function that will let me do what
Code: [Select]
#ScriptNextStepdoes, except to the new lifebar. I've seems many examples but I just can't comprehend without explanation.
Examples include:
Juuni Jumon
Grovyle script

Victini (Grovyle Script), doesn't use plural scripts at all. All of his bosses are actually enemy scripts. That explains Victini. I can't say anything more since I don't know any more.


Edit:

I have a question about difficult selection in an event script.

Select takes only two parameters. Is there a way to have multiple choices for selection (without being like Nuclear Cheese and making a wall of code to accomplish the task)?

Basically, I have six difficulties, and it'd make debugging MUCH easier if I could just set difficulty Common Data at the start of the script and call the stages that way.

Also, on a semi-related note, how does #include_script work, and if calling stages as tasks, what is the best way to get @Background to run differently for each stage?

« Last Edit: April 21, 2013, 07:01:09 AM by Helepolis »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #884 on: April 21, 2013, 07:07:08 AM »
Edit:

I have a question about difficult selection in an event script.

Select takes only two parameters. Is there a way to have multiple choices for selection (without being like Nuclear Cheese and making a wall of code to accomplish the task)?

Basically, I have six difficulties, and it'd make debugging MUCH easier if I could just set difficulty Common Data at the start of the script and call the stages that way.
That is indeed the method you could use. Though CommonData is only required if you're using variables which need to communicate between files or local functions/code blocks or for persistence. Otherwise global vars would work out well too. (afaik)

Also, on a semi-related note, how does #include_script work,
You have asked this question before several pages ago. http://www.shrinemaiden.org/forum/index.php/topic,12397.msg959489.html#msg959489


and if calling stages as tasks, what is the best way to get @Background to run differently for each stage?
None. A game of more than one stage still remains 1 stage script, thus 1 @BackGround. You need to script in a code where the background is mutated when the player enters the next stage. Example: changing background through if statements.
« Last Edit: April 21, 2013, 07:11:14 AM by Helepolis »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #885 on: April 21, 2013, 12:59:45 PM »
That is indeed the method you could use. Though CommonData is only required if you're using variables which need to communicate between files or local functions/code blocks or for persistence. Otherwise global vars would work out well too. (afaik)
You have asked this question before several pages ago. http://www.shrinemaiden.org/forum/index.php/topic,12397.msg959489.html#msg959489

None. A game of more than one stage still remains 1 stage script, thus 1 @BackGround. You need to script in a code where the background is mutated when the player enters the next stage. Example: changing background through if statements.

Common Data: OK. However, how would the player be able to choose the difficulty then if I only had one script? Would making a menu be the best option? Select only allows for two difficulties, so I'm unsure of what to do (my default is to make six different full game files, which is obviously going to be extremely difficult to debug).

#include_script: I was more concerned about how variables defined in the included script were handled. Do they only exist in the include or are they treated as part of the first script? Also, if you use #include_function to the same function in different #include_scripts, then will there be an error since two functions with the same name have been loaded?

Backgrounds: So I should have a CommonData called "Stage" and alter the background accordingly in the full game script?

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #886 on: April 21, 2013, 04:47:20 PM »
1. I'm a little confused as to what you mean by Select, but if you want 1 attack file regardless the difficulty, one way to go about this is to use a number that you incorporate in a variety of different ways to balance things (loops, bullet speeds, bullet number, bullet delay, time between each bullet barrage, etc.). You would set up a number for each of the difficulties in whichever way you prefer, then pass it to your attacks. Making an in-game menu would be the best user friendly option for this method.
Example of how the difficulty number would work:
Code: [Select]
// 'difficulty' is the difficulty level; here, it ranges from 12, 36, 48, 72, 96, 120
let lovp = difficulty/4+7;
ascent(i in 0..lovp){
CreateShot01(x, y, difficulty/52+1.5, GetAngleToPlayer+(360/lovp)*i, RED03, 12);
}

2. I'm not familiar with #include_script, so I can't answer this with 100% certainty, though #include_function does make the variables defined there as part of the first script (along with all the other tasks/functions/subs)

3. Not necessarily with common data (you can just use a variable), but yes that's the idea.

Edit: Just realized there's a function called Select; this wouldn't be a good choice for the difficulty select; you'd have to make your own menu.
« Last Edit: April 21, 2013, 04:49:59 PM by gtbot »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #887 on: April 21, 2013, 05:04:52 PM »
1. I'm a little confused as to what you mean by Select, but if you want 1 attack file regardless the difficulty, one way to go about this is to use a number that you incorporate in a variety of different ways to balance things (loops, bullet speeds, bullet number, bullet delay, time between each bullet barrage, etc.). You would set up a number for each of the difficulties in whichever way you prefer, then pass it to your attacks. Making an in-game menu would be the best user friendly option for this method.
Example of how the difficulty number would work:
Code: [Select]

2. I'm not familiar with #include_script, so I can't answer this with 100% certainty, though #include_function does make the variables defined there as part of the first script (along with all the other tasks/functions/subs)

3. Not necessarily with common data (you can just use a variable), but yes that's the idea.

1) Now my question has to do with difficulty selection. Would the most effective method be to use a combination of DrawText and GetKeyState?

2) I understand #include_function

Thanks.

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #888 on: April 21, 2013, 05:16:27 PM »
While not the most visually prettiest, DrawText certainly works. Effect objects would probably be preferred since those can generally look a lot better.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #889 on: April 21, 2013, 05:18:24 PM »
While not the most visually prettiest, DrawText certainly works. Effect objects would probably be preferred since those can generally look a lot better.

Is the preferable way to do this in an event script or in a task that is called at the start of a stage script?

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #890 on: April 21, 2013, 06:50:49 PM »
It would probably be preferable to do it with a task/function, since it'd be easier to manage.

Zoriri

  • Danmaku Trainee
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #891 on: April 25, 2013, 01:16:40 AM »
How exactly do you create a stage script? I know how to create enemies for stages, i just don't know how to combine them into a stage, and i cant find a tutorial on how to do so.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #892 on: April 25, 2013, 01:39:03 AM »
How exactly do you create a stage script? I know how to create enemies for stages, i just don't know how to combine them into a stage, and i cant find a tutorial on how to do so.
http://www.shrinemaiden.org/forum/index.php/topic,865.msg31785.html#msg31785 This is a tutorial for making a stage.
http://dmf.shrinemaiden.org/wiki/Stage_Script_Functions_(0.12m) Function list.
Currently a normal player

Zoriri

  • Danmaku Trainee

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #894 on: April 26, 2013, 03:16:56 PM »
Ok. The script
http://pastebin.com/W0595NAB

The screenshot.


The weird part:
Code: [Select]
CreateShot01(GetX, GetY, 2, 80, RED01, 10);
CreateShot01(GetX, GetY, 2, 90, RED01, 10);

CreateShot01(GetX, GetY, 2, 80, RED01, 10);
I didn't mean CreateShot01(GetX, GetY, 2, 100, RED01, 10);

What happens?
Easy Modo? That's for kids, and for me.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #895 on: April 26, 2013, 07:46:26 PM »
Ok. The script
http://pastebin.com/W0595NAB

The screenshot.


The weird part:
Code: [Select]
CreateShot01(GetX, GetY, 2, 80, RED01, 10);
CreateShot01(GetX, GetY, 2, 90, RED01, 10);

CreateShot01(GetX, GetY, 2, 80, RED01, 10);
I didn't mean CreateShot01(GetX, GetY, 2, 100, RED01, 10);

What happens?
That is 80,  100 would be to the left of the 90 bullets...I think
The higher the number, the further clockwise it goes...
And the lower the number, the further counter clockwise it goes.
« Last Edit: April 26, 2013, 07:50:51 PM by Qwertyzxcv »

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #896 on: April 26, 2013, 07:58:35 PM »
That is 80,  100 would be to the left of the 90 bullets...I think
The higher the number, the further clockwise it goes...
And the lower the number, the further counter clockwise it goes.
Or a better way to rephrase it:

Shooting right is 0, shooting down is 90, shooting left is 180, shooting up is 270

So lets say I wanted it to shoot in the bottom right corner I'd put in 45.

Corner shot for reference:
Bottom Right: 45
Bottom Left: 135
Top Left: 225
Top Right:  315
« Last Edit: April 26, 2013, 08:01:00 PM by PhantomSong »

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #897 on: April 26, 2013, 08:41:23 PM »
Also a good tip for beginners: using ascent/descent is a really fast way to make bullet patterns/streams easily. For example, a fan with 3 bullets like the one used in the script above  would be:
Code: [Select]
ascent(i in -1..2){
CreateShot01(GetX, GetY, 2, 80 + i*10, RED01, 10);}

Basically: i is a value saved inside the ascent loop which uses each number it loops through. In this example, they are -1, 0 and 1, because the last value is always the last number (2) - 1. For more information, you should probably check the danmakufu basic tutorial :V.

Second tip: Start using custom shotsheets. They look better, are easier to use (with this I mean, calling them for use, since they only use pure numbers instead of the "RED01" and such)  and more flexible overall. Download them here: http://www.shrinemaiden.org/forum/index.php/topic,1050.0.html
And insert them into your script by using this function:
Code: [Select]
LoadUserShotData("Directory of the shotsheet definition file");

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #898 on: April 26, 2013, 09:06:38 PM »
I've got the CtC replace :V

PS: Nevermind, I though it was weird, but I saw the angle directions at Touhou Wiki and it wasn't that weird.
Easy Modo? That's for kids, and for me.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #899 on: April 27, 2013, 10:00:04 AM »
Now I don't understand what the heck is going on in my script :/.

Using AnimationLib for fairies where the "turntomove" and "turntoidle" animations takes 9 frames: http://pastebin.com/LiYXAKnA

Code used to spawn fairies in the stage file:   
Code: [Select]
task fairies{
  wait(200);
  loop{
 
  CreateEnemyFromFile(smallfairy1,GetClipMinX,120+rand(-100,100),0,0,1);  //fairy spawn test
 
  wait(10);
  }}

Code used for the fairies movement: 
Code: [Select]
task movement{
  SetAngle(rand(-20,20));
SetSpeed(1+rand(1,2));
 }

It first seems to be working, but then alot of the spawned fairies gets stuck with the idle animation, even while moving sideways and I can't find the problem.
« Last Edit: April 27, 2013, 10:09:48 AM by Darkness1 »