Author Topic: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (locked)  (Read 268543 times)

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #900 on: November 10, 2013, 04:29:56 PM »
Technically, I increased bullet size by 1 pixel (so, it's (x+1,x+1) instead of original (x,x)), not image size. In practice, check this image (the difference is that I copied quarters instead of just moving to avoid those empty white lines), you should make a proper bullet image from scratch.
« Last Edit: November 10, 2013, 04:32:21 PM by Vectorfish »
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

KuroArashi100

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #901 on: November 10, 2013, 04:39:24 PM »
OK, that makes sense. Again, thank you!
Now I just have to do 5 more bullets or something, and then my shotsheet is hopefully done.
I think I have to draw everything a third time though ... I have no idea how to draw things with pixels.

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #902 on: November 10, 2013, 04:55:56 PM »
I think I have to draw everything a third time though ... I have no idea how to draw things with pixels.
If you're talking about resizing existing bullets to be odd sized so they would work fine for rotation then you can just resize them in pretty much any image editor (for example, it was Kolourpaint in my case) but probably I got your words in a wrong way.
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

KuroArashi100

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #903 on: November 10, 2013, 05:58:16 PM »
No, that wasn't really what I meant. What I was talking about is that I'm really bad at drawing the bullets themselves, and because some of them don't look good IMO, I probably have to draw them again. That already happened once before, so I'm not really looking forward to that.
I don't have all that many spinning bullets, just bubbles that I still need to make, stars and these glowing orbs which weren't odd sized like it seems they need to be, and the stars don't seem to suffer from the same problem for some reason.

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #904 on: November 12, 2013, 03:55:44 PM »
I have this error message when I try to run a stage script. I know it involves EnemyBossScene but not matter what I try, I still have error. And I got this once.
I even tried to copy-paste into google translate but it keeps appearing this corrupted text  "EnemyBossScene????????????????????"

This is how the stage script looks like and this is how the plural script looks.

the funny thing is that when you play the plural file it runs perfectly. I even tried to load and start 001.txt and 002.txt separately in the stage file but I got the same error. it's driving me crazy  :getdown:

Thanks in advance

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #905 on: November 12, 2013, 04:06:54 PM »
I think its because your probably calling two bosses, assuming cirno is a boss seeing as that's what the variable is called. Something danmakufu can't do. Remove cirno.txt or plural and see what happens.

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #906 on: November 12, 2013, 05:05:13 PM »
I have this error message when I try to run a stage script. I know it involves EnemyBossScene but not matter what I try, I still have error. And I got this once.
"EnemyBossSceneが作成されていません" (wasn't created) and "すでにEnemyBossSceneオブジェクトが存在します" (already exists). Not sure if it helps much.
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #907 on: November 12, 2013, 05:15:39 PM »
How strange. Cirno was defined as ENEMY_BOSS and the files in the plural as ENEMY. Or it was because you can't make a plural file without a boss? Anyways, I manage the solve it making cirno the enemy and the enemies into boss.

Edit, new reply: Yeah, it helps! You can't make a plural file without a boss then  :V

By the way. How does CommonData works in this new engine? What's the difference using CommonData or AreaCommonData?
I couldn't understand from what I've read on the wiki

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #908 on: November 13, 2013, 07:57:12 AM »
When running single scripts, one of the default_system scripts makes a boss scene for you. You tried to start the cirno boss script through the stage, so no boss scene was created. In general, trying to spawn a boss directly through the stage in this way won't work, but regular enemies don't need a boss scene to run, so switching cirno to a normal enemy "worked". Calling the enemies as bosses "worked" because you started the boss scene first and called them the way you're supposed to.

The second error would have occurred when you try to create a boss scene when the default-generated one already exists.

I'm sort of confused how you've structured the cirno boss and the other enemies. What does cirno.txt contain? You should be starting the boss scene and then adding the different patterns to the boss scene, like you currently have the 001 and 002 enemies.
« Last Edit: November 13, 2013, 08:01:50 AM by Drake »

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

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #909 on: December 01, 2013, 06:05:23 PM »
Not sure this should go here, but is there a way to get danmakufu running on Windows 7 Home Premium (which doesn't have language packs)?

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #910 on: December 01, 2013, 06:22:44 PM »
As long as there are no Japanese characters in any of the scripts (player script/stg script), it will run without needing to switch locale.

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #911 on: December 13, 2013, 03:50:50 PM »
Okay. So what I want is my bullets to bounce off some lasers, but the lasers are in the shape of an octagon along the edges of the screen. I have the formula for changing the angle of the bullets once they reach the laser; ObjMove_SetAngle(bulletObj, 180*cos(angleofthelaser)-ObjMove_GetAngle(bulletObj)). But I have no clue how to get the bullet to register that it has reached the laser. If the lasers were at 180 or 360 degrees I could just use an if statement with ObjMove_GetX or ObjMove_GetY. Is there any similar function or a mathematical forumla I could use to tell the bullet it's passed he laser? Or is there a better way to do this than if statements?
My name is Tres. It sounds like "Tray". Tressert is "Tray-zurt"; like Tres dessert.
I've cleared every touhou game on Lunatic, and beaten every extra except SoEW.
NMNB: MoF Hard, SA Extra, UFO Extra

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #912 on: December 15, 2013, 03:15:12 AM »
Man. I'm finally getting back into danmakufu, but everything is immensely hazy.

How can I get enemy bullets to not get deleted after a player dies?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #913 on: December 15, 2013, 09:09:49 AM »
Man. I'm finally getting back into danmakufu, but everything is immensely hazy.

How can I get enemy bullets to not get deleted after a player dies?
Not quite sure, in 0.12m it was setting the spell resistance function for it.
http://dmf.shrinemaiden.org/wiki/Shot_Object_Functions#ObjShot_SetSpellResist

Not sure if in ph3 it is the same thing. Can someone confirm?

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #914 on: December 15, 2013, 10:39:55 AM »
Not quite sure, in 0.12m it was setting the spell resistance function for it.
http://dmf.shrinemaiden.org/wiki/Shot_Object_Functions#ObjShot_SetSpellResist

Not sure if in ph3 it is the same thing. Can someone confirm?

Spell resistance prevents deletion from player death. Unless the function that deletes bullets in the player script is set to delete TYPE_ALL instead of TYPE_SHOT.

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #915 on: December 15, 2013, 09:26:52 PM »
Thanks! It looks like it was the player I was using that was the problem.

Alicirno

  • Seer of Heart
  • Paruparuparu
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #916 on: December 20, 2013, 03:38:10 PM »
Hmm, how would you make a "double" boss, like the Tsukumo Sisters in DDC Extra?

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #917 on: December 20, 2013, 04:31:40 PM »
Ooh, I know this one.

One way you could do it is choose one of them to be the actual boss. It doesn't matter which, and it'll have no effect on anything, I'll name it "Benben". Wherever you create the boss object "Benben", make another enemy but make this an ordinary enemy (use OBJ_ENEMY, not OBJ_ENEMY_BOSS), which I'll call "Recliner".

Change all your render tasks to have a variable parameter, such as "target", and everywhere the task would normally have "Benben", replace it with "target". Call every task requiring "target" twice, once with "Benben" and once with "Recliner".

If you want them to have a single health bar (like the Prismrivers) there are a couple ways to do it. I think the easiest way is double the amount of damage your shot does, then create only a hitbox for "Benben" at "Benben"'s location. Immediately after creating that hitbox, create another hitbox for "Benben" but create it at "Recliner"'s position. In your end task (the task that deletes the boss when it's health runs out) delete both "Benben" and "Recliner".

If you want to make each boss have a separate health bars (like in the Tsukumo's opening non spell) take your end task and give it the variable parameter "target". Call the end task twice, once with "Benben" and once with "Recliner". In the end task, remove the "CloseScript" function. Make another task that will only close the script once both enemy's health is equal to zero. Create a hitbox for each enemy and place it at their location. When you create "Recliner", also set it's health and damage rate.

If you want to make each boss have their own health bar, but have the spell end when either of them dies (like in the Tsukumo's spell cards) go about it as if they each had their own health bar (the paragraph above) but don't remove the "CloseScript" function from your end task.

Sorry if this is confusing, I hope I helped.
My name is Tres. It sounds like "Tray". Tressert is "Tray-zurt"; like Tres dessert.
I've cleared every touhou game on Lunatic, and beaten every extra except SoEW.
NMNB: MoF Hard, SA Extra, UFO Extra

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #918 on: December 20, 2013, 05:22:33 PM »
You need a boss and a enemy. You can do it easily by having Benben as the boss and Yatsuhashi as the enemy.

First Set up Yatsuhashi's object (register her, set graphics ect...) then you want a task similar to TEnd, here's a piece of code from my Reisen and Tewi Boss.

http://pastebin.com/aZKXiT8s

obj is the Boss's object ID and fairy is the enemy's.

Then at the beginning of the next script when Yatsuhashi is called again use this.

ObjMove_SetPosition(objw, GetCommonData("tewix",NULL), GetCommonData("tewiy",NULL));

Of course, you would rename TewiX and TewiY to YatsuX and YatsuY or whatever.

Alicirno

  • Seer of Heart
  • Paruparuparu
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #919 on: December 20, 2013, 10:08:08 PM »
Ah, thanks Tresser. I understand most of what you said, don't worry!  And also thanks Ultima! For some reason, I didn't think about using CommonData even though I had been using it for other stuff like PIV. I think I've got enough to make this.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #920 on: December 21, 2013, 11:25:00 AM »
Not quite sure any more, was there a function/command to kill all active loops/threads in a script. CloseScript does this, however I was curious whether it was possible to kill the loops before calling CloseScript. If not, I'll just adjust my script flow though would make my life easier.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #921 on: December 23, 2013, 05:41:49 PM »
I don't think so. Unless you're talking about break; though it only ends the task it was called in.

Kimidori

  • Undefined Fantastic Girl, Nue
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #922 on: December 24, 2013, 08:57:57 AM »
I'm new to this program, I have learned basic stuff like create a bullet, set boss, shot, BG, cutin graphic and such. my question is: is there any easy way to make bullets create a shape? like a star, flower, eye? or do I have to draw them by setting coordinate for every single bullet to make those shape? also once the shape is created is there anyway to rotate them while keeping the shape?
« Last Edit: December 24, 2013, 09:00:32 AM by Kimidori »


"No matter what, cute is justice. If you're watching shows without moe, you should really be questioning your life decisions. The creation of 2D anime girls is the pinnacle of human achievement." -Logan M

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #923 on: December 24, 2013, 10:14:52 AM »
You'd have to learn the geometry necessary for whatever shape you want to make. Most of the time it will involve some trigonometry. For a star of size R you could start at the center, move up R pixels and make a bullet there (making one "point" of the star), then move the spawn position from there towards another "point" on the star, then another, and so on until it makes the whole star.



So here you can see what I'm talking about. From the center you move up r pixels and your first bullet goes there. Then you move at a 72-degree angle and you place more bullets every so often depending on how dense you want the star to be. You do this until you hit the bottom-right point, then start moving at a 216-degree angle instead. Then a 0-degree angle, then 144, then 288 and you end up at the start with bullets placed along the red lines.

How this is accomplished is a lot more complicated than what you say you've done so far. So the answer is no, there isn't an easy way, if you want something as easy as setting backgrounds and moving around bosses.

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

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #924 on: December 24, 2013, 05:19:57 PM »
Hey guys,, I've got a small problem. I've created a script which almost completely works, but only almost. I don't know where this problem is. The main problem is that the laser shooting doesn't work. Whenever it shoots a laser the projectile is showed up shortly but nothing else happens. What did I wrong? The script is here. Oh and FYI, I'm a bit familiar with Danmakufu. In the non spell the Boss spawns some random bullets which are after some seconds aimed to the player plus some random bullets from the left and right side of the screen (similarly to Yuyuko's non spells in TD).

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #925 on: December 24, 2013, 11:35:04 PM »
Edit: Wait hold on, going over this again. I might have been totally wrong.
Edit2: Okay looks like I didn't click the wrong wiki section after all. I thought I forgot to click ph3 or something. Copypasting my old post then.
-----
I don't danmakufu often, so I'm sorry if I got this completely wrong. But I looked at that real quick and it looks to me like the laser is just created incorrectly. See this line.
Code: [Select]
objLaser = CreateStraightLaserA1(ex, ey, 3, dir, 50, 5, DS_NEEDLE_WHITE, 0);As can be found here, it goes (x-coordinate, y-coordinate, angle, length, width, delete time, graphic, delay).

And it looks to me like this laser lasts a very short 5 frames before being deleted. I haven't run your code or anything to be sure, but I assume that is not what you wanted.

Also, while you're fixing that, I think maybe you mixed up your length, width, and angle. Right now that'll shoot a laser, if I'm reading this correctly, that is fired at angle 3, "GetAngleToPlayer(objEnemy)" long, and 50 wide.
« Last Edit: December 24, 2013, 11:39:24 PM by SirBlueberry »

Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #926 on: December 25, 2013, 06:17:22 AM »
Whoops, I've confused "CreateLooseLaserA1" with "CreateStraightLaserA1". My mistake. :D Oh well, at least, it works.
« Last Edit: December 25, 2013, 04:48:56 PM by MarioFanGamer659 »

Kimidori

  • Undefined Fantastic Girl, Nue
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #927 on: December 25, 2013, 10:34:54 AM »
You'd have to learn the geometry necessary for whatever shape you want to make. Most of the time it will involve some trigonometry. For a star of size R you could start at the center, move up R pixels and make a bullet there (making one "point" of the star), then move the spawn position from there towards another "point" on the star, then another, and so on until it makes the whole star.



So here you can see what I'm talking about. From the center you move up r pixels and your first bullet goes there. Then you move at a 72-degree angle and you place more bullets every so often depending on how dense you want the star to be. You do this until you hit the bottom-right point, then start moving at a 216-degree angle instead. Then a 0-degree angle, then 144, then 288 and you end up at the start with bullets placed along the red lines.

How this is accomplished is a lot more complicated than what you say you've done so far. So the answer is no, there isn't an easy way, if you want something as easy as setting backgrounds and moving around bosses.

managed to create a star with loop... still have no idea how should I rotate them without breaking apart the shape though. :/

also do you have anything like that pic with a flower shape?


"No matter what, cute is justice. If you're watching shows without moe, you should really be questioning your life decisions. The creation of 2D anime girls is the pinnacle of human achievement." -Logan M

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #928 on: December 25, 2013, 08:52:12 PM »
You could get a flower shape by drawing out an epicycloid, which is a complicated shape but not too difficult to generate.
http://en.wikipedia.org/wiki/Epicycloid

Rotating the whole shape comes down to finding the distance from each bullet to the center of the shape, and moving the bullet in a circle with a radius of that distance, inside of a task. But of course you want the shape to move as well (as it's the thing being fired, really), so it's more like you want to fire the center point of the shape in some direction, know the distance from each bullet to the center according to the shape, and have the bullets rotate around the moving center keeping that distance from the center.

So if a bullet is distance r from the center of the shape, every frame you would position the bullet at (centerx + r * cos(t), centery + r * sin(t)) where t is the current angle of the shape.

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (latest version pre2x)
« Reply #929 on: December 25, 2013, 09:25:31 PM »
You could get a flower shape by drawing out an epicycloid, which is a complicated shape but not too difficult to generate.
http://en.wikipedia.org/wiki/Epicycloid

Rotating the whole shape comes down to finding the distance from each bullet to the center of the shape, and moving the bullet in a circle with a radius of that distance, inside of a task. But of course you want the shape to move as well (as it's the thing being fired, really), so it's more like you want to fire the center point of the shape in some direction, know the distance from each bullet to the center according to the shape, and have the bullets rotate around the moving center keeping that distance from the center.

So if a bullet is distance r from the center of the shape, every frame you would position the bullet at (centerx + r * cos(t), centery + r * sin(t)) where t is the current angle of the shape.

If you need code for curves, I abused them in PDD and transferring to ph3 is just a matter of renaming functions. Just keep in mind that for an epicycloid, r changes over time.