Author Topic: ※ Danmakufu Q&A/Problem thread 3 ※  (Read 468574 times)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #600 on: June 05, 2017, 04:53:19 PM »
lel its another stupid question from me.
I try to fire a ring of bullets like the script here https://pastebin.com/yeQg5Dj5 , after i load it, its not defining my mainTask ! Why ?  ???

Hint: Do your { and } match up? Take a good look at @Event.

EDIT: Also take a good look at @Finalize.

In general, if there is a 'X not defined' error and it's definitely defined, you have an error with your { blocks }. It is highly recommended that you use a text editor that shows you whether or not your parenthesis and braces are matching, and when in doubt do a Ctrl-F to see if the number of { is the same as the number of }. If they aren't, you have a problem and you should check your code carefully.
« Last Edit: June 05, 2017, 04:55:33 PM by Sparen »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #601 on: June 06, 2017, 12:26:11 PM »
Hello!
I've been using danmakufu for a while now, but I was wondering if anyone could tell me how to create a triangle or a square (or other things like that) in danmakufu. I've been trying to create shapes other than circles and diamonds, but I have no idea what to do.  :ohdear:

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #602 on: June 06, 2017, 02:10:28 PM »
Hello!
I've been using danmakufu for a while now, but I was wondering if anyone could tell me how to create a triangle or a square (or other things like that) in danmakufu. I've been trying to create shapes other than circles and diamonds, but I have no idea what to do.  :ohdear:

This question is asked like every few months. Honestly someone should just compile the methods and post it on the Wiki. :|

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #603 on: June 07, 2017, 08:01:47 AM »
Getting to shoot shapes isn't even that good for making decent bullet patterns but everyone wants to know anyway lol

This was the last version I remember writing? Reposting here. Explanation and math was also a few posts above.

Code: [Select]
function CreateShotShapeOA1(obj, sides, gap, speed, angle_off, graphic, delay){
let x = ObjMove_GetX(obj);
let y = ObjMove_GetY(obj);
let t = 0;
while(t < 360){
let r = cos(180/sides) / cos(((t - angle_off) % (360/sides)) - (180/sides));
CreateShotA1(x, y, r * speed, t, graphic, delay);
t += gap;
}
}

When shooting a shape outwards, you can interpret the "radius" of a point in a shape as a speed value, multiplying it for a faster shape. Basically "increase the radius of the shape by speed each frame".

Meanwhile spawning the shape at a location and size is also a matter of multiplying ("give the shape a certain radius size") and converting back to x,y coordinates, so

Code: [Select]
CreateShotA1(x + size*r*cos(t), y + size*r*sin(t), s, a, g, d);

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

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #604 on: June 07, 2017, 03:08:53 PM »
Hello!
Does anyone know how to make triangles or squares in danmakufu?

Edit:
(Oops, didn't know this was already answered. Don't mind the other message I sent).
Is there a way to do this without resorting to functions? Sure, it'll be much easier to control and such but I'm just wondering.
« Last Edit: June 07, 2017, 05:12:29 PM by Helepolis »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #605 on: June 07, 2017, 04:19:27 PM »
I know this is a stupid question , so that after i finished the script , (its the same script) however, i didn't realize that i forgotten the finalizing .
I tried every way to do it but it seems its not even working, So, how to do the finalize the most convenient and easiest way ? :3
Just keep it neutral :3

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #606 on: June 07, 2017, 05:20:03 PM »
Hello!
Does anyone know how to make triangles or squares in danmakufu?

Edit:
(Oops, didn't know this was already answered. Don't mind the other message I sent).
Is there a way to do this without resorting to functions? Sure, it'll be much easier to control and such but I'm just wondering.
Probably there is, though, why would you try to make your life more difficult?


I know this is a stupid question , so that after i finished the script , (its the same script) however, i didn't realize that i forgotten the finalizing .
I tried every way to do it but it seems its not even working, So, how to do the finalize the most convenient and easiest way ? :3
I am having trouble understanding your question, but do you mean your script doesn't close? Are you using the CloseScript function to close your script? Also, forgive me for sounding rude but I would highly recommend you to follow either the video tutorials or written tutorials. These questions are really covered in those.

OT: Curious though, where are you from? Could it be that English isn't the common language for you?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #607 on: June 07, 2017, 10:45:43 PM »
Is there a way to do this without resorting to functions? Sure, it'll be much easier to control and such but I'm just wondering.
wat

that question doesn't even make sense, please explain

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

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #608 on: June 08, 2017, 12:14:20 PM »
a. I'm not sure about it, because I compared to the script that is almost the same on your tutorial 4 (I didn't put BGM's). Here https://pastebin.com/8Z1VdYhu.
b.Your not rude :)
c. Its right, mine English sucks,  :blush: :blush: I came from Southeast Asia so I didn't communicate with English with my family and friends .

*The script says TEnd; its not defined.
Just keep it neutral :3

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #609 on: June 08, 2017, 12:32:33 PM »
*The script says TEnd; its not defined.

If it's not defined, then define it. :|

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #610 on: June 08, 2017, 12:38:59 PM »
a. I'm not sure about it, because I compared to the script that is almost the same on your tutorial 4 (I didn't put BGM's). Here https://pastebin.com/8Z1VdYhu.
b.Your not rude :)
c. Its right, mine English sucks,  :blush: :blush: I came from Southeast Asia so I didn't communicate with English with my family and friends .

*The script says TEnd; its not defined.
a. >> I doubt you're doing the same, because otherwise you wouldn't get that error. Defining tasks or functions is done using:  task nameOfYourTask { } or function nameOfYourFunction{ }. You can't just call TEnd if you never defined it. That goes for any task / function or sub routine.


Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #611 on: June 08, 2017, 02:00:54 PM »
I still don't understand . its the maintask or the task TEnd ?
Just keep it neutral :3

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #612 on: June 08, 2017, 06:23:17 PM »
I still don't understand . its the maintask or the task TEnd ?
To be honest, I have no idea what you're asking me and also I have no idea how to even explain this better than the tutorials.

Please read Sparen's tutorial about "How do I close the script"

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #613 on: June 10, 2017, 07:19:25 AM »
Looking at the pastebin, BananaCupcakey is missing a closing curly bracket } at the end of the `fire` task.

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

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #614 on: June 10, 2017, 08:13:14 AM »
What would be the ph3 equivalent of the ObjEffect_SetVertexXY function?

I'm trying to port my old danmaku script into ph3 but the wiki doesn not provide it's equivalent.

Thanks in advance
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Lollipop

  • stay woke
  • literally and figuratively dying
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #615 on: June 10, 2017, 05:41:40 PM »
What would be the ph3 equivalent of the ObjEffect_SetVertexXY function?

I'm trying to port my old danmaku script into ph3 but the wiki doesn not provide it's equivalent.

Thanks in advance

http://dmf.shrinemaiden.org/wiki/Primitive_Object_Functions#ObjPrim_SetVertexUV

i think it's this, not sure
Touhou 1CCS:
Hard: LLS, EoSD(NB), PCB(NB), IN, MoF, TD, DDC(NB), LoLK
Lunatic: EoSD, PCB, DDC, LoLK
Extra: LLS, EoSD, PCB(Extra&Phantasm), IN, MoF, SA, DDC, LoLK
Current Focus: 1cc SA Hard, or an Extra

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #616 on: June 10, 2017, 05:43:27 PM »
What would be the ph3 equivalent of the ObjEffect_SetVertexXY function?

I'm trying to port my old danmaku script into ph3 but the wiki doesn not provide it's equivalent.

Thanks in advance
If I didn't misunderstood, I believe for vertex position it is ObjPrim_SetVertexPosition and for setting its textures it is ObjPrim_SetVertexUVT. You'll have to use ObjPrim_Create(OBJ_PRIMITIVE_2D); and choose a ObjPrim_SetPrimitiveType though.

Edit: Oh lollipop was before me.

« Last Edit: June 10, 2017, 05:59:56 PM by Helepolis »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #617 on: June 11, 2017, 10:30:06 AM »
I'm currently working on an English Patch for the fangame Touhou Riverbed Soulsaver.
I'm currently doing the Phantasm stage. After defeating the Midboss Ruri, this message appears.

Code: [Select]
_NextChar:すでに文字列終端です
I'm not sure what this is supposed to mean. This message appears with all three characters at the same point. The only code I have changed was the text in the dialog.

So, does anyone have an idea what causes this kind of Error?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #618 on: June 11, 2017, 10:44:49 AM »
I'm currently working on an English Patch for the fangame Touhou Riverbed Soulsaver.
I'm currently doing the Phantasm stage. After defeating the Midboss Ruri, this message appears.

Code: [Select]
_NextChar:すでに文字列終端です
I'm not sure what this is supposed to mean. This message appears with all three characters at the same point. The only code I have changed was the text in the dialog.

So, does anyone have an idea what causes this kind of Error?
Memory is fuzzy, I remember running into this problem with my own game. Most likely you're breaking the commenting code such as // or /* causing the script to mess up major. Or you broke the file by saving it without Japanese font support (encoding such as SHIFT JIS or UTF-8).

Back tracking this error is nearly impossible unless the game is giving you a file name or line number.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #619 on: June 11, 2017, 11:05:46 AM »
There is no dialogue after the midboss, so that was a bit confusing. Looking into the scripts, the stage script immediately starts loading the following boss:

Code: [Select]
// 次ボスロード開始
compile_file_h[1] = LoadScriptInThread(plural[1]);
LoadBossScript(compile_file_h[1]);

Considering this, something is probably going wrong in the boss script's dialogue instead (if you're only modifying those). Look in that direction.
« Last Edit: June 11, 2017, 11:07:21 AM by Drake »

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

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #620 on: June 11, 2017, 11:11:27 AM »
Whoa, thanks for the quick help.
I found the problem. RSS has this method of little overtexts, that appear in some dialogs, to add a second meaning to the text.
Not sure if that's understandable. But by cutting those out, I was able to make it run properly.
So it's working now.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #621 on: June 11, 2017, 11:48:40 AM »
Oh, that's just rubytext. It would be good to know how to format this, considering it's part of the dialogue. Did this not come up previously?

A rubytext string should look like "text [ruby rb=\"bottom\" rt=\"top\"] more text"
You should make sure the formatting there is all correct; the bolded parts are necessary.
« Last Edit: June 12, 2017, 01:32:24 AM by Drake »

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

Gregory

  • I draw stuffs
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #622 on: June 12, 2017, 06:24:58 AM »
a question, how can I make Reimu's boundary field ?

TIA

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #623 on: June 12, 2017, 07:45:09 AM »
a question, how can I make Reimu's boundary field ?

TIA
To be honest, this question is in my opinion way to generic and in the same league as: "Please make this spell card for me".

Could you be a bit more specific what exactly you want to know in order to simulate one of her spell cards?

Gregory

  • I draw stuffs
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #624 on: June 12, 2017, 09:35:02 AM »
To be honest, this question is in my opinion way to generic and in the same league as: "Please make this spell card for me".

Could you be a bit more specific what exactly you want to know in order to simulate one of her spell cards?

sorry, I mean how's the mechanic works, because I'm still new to danmakufu so I want to see how the mechanic looks like

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #625 on: June 12, 2017, 12:15:17 PM »
sorry, I mean how's the mechanic works, because I'm still new to danmakufu so I want to see how the mechanic looks like

There are going to be a variety of different implementations. Personally I would assign each bullet a value and using that value, determine which boundary the bullet is in. Depending on the value, I would move the bullet to a different position when they are in a certain part of the screen, and change angle/etc. accordingly.

CrestedPeak9

  • Fangame Advocate
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #626 on: June 13, 2017, 10:41:00 AM »
How do I make a bullet glow?
When tinkering with various shotsheets and RSS, I could spawn "glow orbs" but they didn't glow. I assume it's done with bullet draw functions, but I couldn't figure out how to do it or where the 'glowing' code was.
Lunatic 1cc: EoSD, PCB, IN, MoF, TD, DDC, LoLK, HSiFS, WBaWC

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #627 on: June 13, 2017, 10:44:14 AM »
using pure black background (rgb 0,0,0) (not necessary required) and ADDITIVE rendering will make the bullets appear glowy. The way the bullet is designed also helps in enhancing this look.

CrestedPeak9

  • Fangame Advocate
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #628 on: June 13, 2017, 12:38:02 PM »
using pure black background (rgb 0,0,0) (not necessary required) and ADDITIVE rendering will make the bullets appear glowy. The way the bullet is designed also helps in enhancing this look.

Do you mind explaining which functions I should use? I don't really understand how it works.
Lunatic 1cc: EoSD, PCB, IN, MoF, TD, DDC, LoLK, HSiFS, WBaWC

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #629 on: June 13, 2017, 01:09:43 PM »
Do you mind explaining which functions I should use? I don't really understand how it works.

There are two options: You can define the bullets to be ADD_ARGB or ADD_RGB in the shot sheet (ARGB if your bullet graphic uses alpha for glow and RGB is your bullet graphic has a black background) or in-game, by using ObjRender_SetBlendType.

What are the Properties of a Shot in a Shotsheet?
Utilizing Blend Types in Danmakufu