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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #330 on: April 29, 2012, 02:01:48 PM »
You realize this was on the first page of threads right?
http://www.shrinemaiden.org/forum/index.php/topic,12412.0.html
I know, that's to make scripts for shotsheets. I was talking about the actual image files and asking for good ideas for making them.
Like, the actual shot types (bubble, star, arrowhead etc).
« Last Edit: April 29, 2012, 02:03:24 PM by fonduemaster »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #331 on: April 29, 2012, 03:14:26 PM »
I know, that's to make scripts for shotsheets. I was talking about the actual image files and asking for good ideas for making them.
Like, the actual shot types (bubble, star, arrowhead etc).

If you have photoshop, you can use the grid function to make it easier to line up the bullets. Just make sure the distance is the same between all bullets of the same type and in a neat row and it should be fine.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #332 on: April 30, 2012, 07:33:57 AM »
Well, I'm getting ready for more complicated things to learn

1. How can I make the CutIn like those in MoF/SA/UFO/TD?
2. How can I make dialogs - conversation between characters? Can I do it in Plural script or just Stage script?
3. How can I make familiars?  :ohdear:

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #333 on: May 01, 2012, 03:19:30 AM »
Well, I'm getting ready for more complicated things to learn

1. How can I make the CutIn like those in MoF/SA/UFO/TD?
2. How can I make dialogs - conversation between characters? Can I do it in Plural script or just Stage script?
3. How can I make familiars?  :ohdear:

1. http://www.mediafire.com/?dbtdzfbnuturnib; Put #include"./Cutin.txt" in the header for the file you want the cutins to be added for. Keep in mind that depending on your file structure, you may have to edit the image paths in Cutin.txt. This is true when only white squares appear instead of the proper image. When editing the image paths, keep in mind that it is relative to the script calling Cutin.txt, not relative to Cutin.txt itself. Instructions on how to use the cutins are in Cutin.txt

2. You can do it in any script you desire, the key to getting it down is "display image and text; when shot button is pressed, move on". In the download for the cutins, I added a file that i was messing around with some time ago. This file contains a crude version of a Ten Desires conversation. Add #include"./EventTest.h" into the Sample.txt file to see how it works.

3.
Code: [Select]
let objFamiliar = CreateOption;

function CreateOption{
let obj = ObjEnemy_Create(OBJ_ENEMY);
ObjEnemy_Regist(obj);
ObjPrim_SetTexture(obj, familiarimage);
ObjSprite2D_SetSourceRect(obj, rec1, rec2, rec3, rec4);
ObjSprite2D_SetDestCenter(obj);
ObjEnemy_SetLife(obj, familiarlife);
return obj;
}
With the object id you get from this task, you may use it as you desire. Alternatively, you may edit this task to suit your needs for your familiar.
« Last Edit: May 25, 2012, 02:23:14 AM by gtbot »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #334 on: May 01, 2012, 05:21:20 AM »
1. http://www.mediafire.com/?dbtdzfbnuturnib; Put #include"./Cutin.txt" in the header for the file you want the cutins to be added for. Keep in mind that depending on your file structure, you may have to edit the image paths in Cutin.txt. This is true when only white squares appear instead of the proper image. When editing the image paths, keep in mind that it is relative to the script calling Cutin.txt, not relative to Cutin.txt itself. Instructions on how to use the cutins are in Cutin.txt

2. You can do it in any script you desire, the key to getting it down is "display image and text; when shot button is pressed, move on". In the download for the cutins, I added a file that i was messing around with some time ago. This file contains a crude version of a Ten Desires conversation. Add #include"./EventTest.h" into the Sample.txt file to see how it works.

I tried the sample and get an error:


Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #335 on: May 01, 2012, 07:10:22 AM »
It says CreateSpeechImageA1 is undefined, which means you're calling something that your script currently can't find, basically. If you try to call on a variable or function named XYZ, but you haven't actually made XYZ, this error will happen. Assuming that you can't read japanese, please attempt to familiarize yourself with how the message looks, at least, because over time you will probably see it often enough.

Next, what are the steps to fix this, or at least the steps to figure out what is wrong?

If you don't know, then you probably should not be attempting to work this at the moment.

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

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #336 on: May 02, 2012, 12:46:16 PM »
Yes, you said that, I was just affirming that "script/folder/shotimage.png" is the correct method.
Alright, but how exactly are you loading it? Telling me you're using LoadEnemyShotData() doesn't help much. Can you paste the shot script on pastebin? The code section that you're using LoadBla() in?
I have the code on a separate computer at the moment.

But I managed to load it without the script returning an error. However, bullets won't spawn at all.

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #337 on: May 11, 2012, 02:47:13 AM »
Not really a question, but I finally figured out how to get fonts working.

1) You have to use a Shift-JIS font. Sorry, no Comic Sans.

2) Use the path to the font for InstallFont, and use the name of the font (open the ttf file and check the top) for ObjText_SetFontType.

Here's a usable serif font if anyone wants it.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #338 on: May 12, 2012, 03:37:45 AM »
Another question:

1) I tried making a plural script of Momiji so I get the images rip from Drake's Project and have this



So how can I make enemy (or any other objects) animate?  :ohdear:

2) I also want to create some background just like the original game, but I don't know how to make background script  :ohdear:
« Last Edit: May 12, 2012, 04:16:05 AM by numbuh1 »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #339 on: May 12, 2012, 06:30:40 AM »
http://www.youtube.com/watch?v=JUj6xG79-TY

but use 2d sprite objects instead

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #340 on: May 15, 2012, 08:08:29 PM »
hi all , can i ask how to make the img i use with "#Image" on the start of the script to fit ?     my pic is  850x803   the default of danmakufu is 192x224 and that only take a corner of my pic , tried minimizing it with paint but it wont do the trick (quality drop) .  thx for the helpers .

the point (in the end) is that i will have the whole img in the menu right by the description
« Last Edit: May 15, 2012, 08:11:55 PM by silent hill »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #341 on: May 15, 2012, 08:39:34 PM »
hi all , can i ask how to make the img i use with "#Image" on the start of the script to fit ?     my pic is  850x803   the default of danmakufu is 192x224 and that only take a corner of my pic , tried minimizing it with paint but it wont do the trick (quality drop) .  thx for the helpers .

the point (in the end) is that i will have the whole img in the menu right by the description

If you use photoshop or any other advanced image editing program to shrink the image the quality drop will be much lower. Doing it with no quality drop is impossible though.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #342 on: May 16, 2012, 04:00:48 PM »
thx , but i think i wasnt straight with my question , so sorry for the confusion and i will rise some points -

1 im a beginner at danmakufu

2 i have tried to use photoshop but the function of chaining keeps the pixels under collective change so not all of the pic can go in there .
   (as so http://www.youtube.com/watch?v=b8yo7KMhuXM )

3 in the end im looking for some way to declare the X & Y  of the "#Image"  function just like "#background" have  (my hopes are that the 192 x 224 pixels limit is a default)

again cos im new i feel like the answer is right under my nose , salutation or not im just glad there is an active community for danmakufu .
« Last Edit: May 16, 2012, 04:02:53 PM by silent hill »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #343 on: May 16, 2012, 10:32:24 PM »
- Chaining? Collective change? I'm not sure what you mean here.
- You cannot declare the rect to use in #Image.
- The image can be up to 640x480. It can fill up the whole screen, if you want, so where you get 192x224 I have no idea.
- Honestly I'm not sure why you're even bothering with it in the first place. It's just an image that pops up in the danmakufu select menu, just like #Text.

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #344 on: May 17, 2012, 05:14:24 PM »
well , the vid i posted explain the chaining thingy (0:30) .

got the idea of the default pixels there   http://tornworld.forumotion.com/t172-danmakufu       ->   "Image is the image displayed to the right of the description. 192 by 224 seems to be a good resolution for these. "  and the fact that thats the  pixel size danmakufu takes from the top left if i use a bigger pic .

so bottom line , i set a goal to get good with danmakufu , and yes as you are saying this is not something to be bothered with , i should start with patterns .

ok , working on my first boss a more suitable question - can only supershots/objects be modified with the affect of "SetBombResist"  ?
- and how to correctly use "SetForbidPlayerSpell"  ? (thx for helpers)
« Last Edit: May 19, 2012, 12:44:23 AM by silent hill »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #345 on: May 20, 2012, 08:52:39 PM »
All shot functions returns the id of the shot, so SetBombResist works for any shot as long as you store it's ID in a variable.

As for SetForbidPlayerSpell, you can turn player bomb usage off any time with SetForbidPlayerSpell(false) or turn it on with SetForbidPlayerSpell(true).

EDIT: SetBombResist is incorrect by the way, it should be ObjShot_SetSpellResist.
« Last Edit: May 20, 2012, 08:54:27 PM by JmLyan »

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #346 on: May 22, 2012, 05:21:17 AM »
Well, I finally got to experimenting with Ph3. So I was wondering, is it possible to check for the collision between 2 specific objects like Collision_Obj_Obj in 0.12m? ObjCol_IsIntersected only checks whether the specified object intersects with any other object.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #347 on: May 22, 2012, 05:50:22 AM »
Now that you can mush around with objects more freely it's quite simple to do it yourself (except I don't think you can get intersection radii for bullets yet).
Anyways, you want GetObjectDistance(obj1, obj2).

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

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #348 on: May 22, 2012, 06:37:00 AM »
Is that function on the wiki? I can't find it.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #349 on: May 22, 2012, 08:19:18 AM »
No, but it's on the official documentation that likely gets updated more consistently than the wiki currently does ;U
http://www.geocities.co.jp/SiliconValley-Oakland/9951/products/th_dnh_help_v3.html

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

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #350 on: May 25, 2012, 01:42:01 AM »
My friend wants to know how many key inputs Ph3 can detect. He's trying to get it so the player can choose an ability to use without going to some kind of ability select wheel in the middle of gameplay. Also, how exactly to the "user keys" work?

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #351 on: May 25, 2012, 02:03:36 AM »
All of the keys are defined in config.exe and can be freely changed. As for how many keys, why don't you just try hammering a bunch/all of them? If there's a limit (and not a limit of the keyboard) it should become obvious, no?

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

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #352 on: May 25, 2012, 02:56:40 AM »
All of the keys are defined in config.exe and can be freely changed. As for how many keys, why don't you just try hammering a bunch/all of them? If there's a limit (and not a limit of the keyboard) it should become obvious, no?
I probably phrased that question badly. I meant, how many different inputs can Ph3 detect? Apparently by looking at the config screen (which I forgot existed) there are 11 inputs that danmakufu detects, which can be customized to any key. Thanks for your help, since it pointed me in the right direction.

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #353 on: May 26, 2012, 12:50:37 AM »
Sorry for the double post, but I have yet another question. Is it possible to keep the player from dying and respawning when hit? I tried putting SetPlayerInvincibilityFrame in EV_HIT but it didn't work. I was trying to make a player that has a health system rather than extra lives.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #354 on: May 26, 2012, 08:25:34 PM »
Sorry for the double post, but I have yet another question. Is it possible to keep the player from dying and respawning when hit? I tried putting SetPlayerInvincibilityFrame in EV_HIT but it didn't work. I was trying to make a player that has a health system rather than extra lives.

You could have the player script automatically call a bomb script under EV_HIT so that it sort of autobombs, but the bomb script doesn't actually do anything other than decrease the health variable and only lasts one frame (as well as keeps bomb stock the same).

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #355 on: May 26, 2012, 10:13:11 PM »
You could have the player script automatically call a bomb script under EV_HIT so that it sort of autobombs, but the bomb script doesn't actually do anything other than decrease the health variable and only lasts one frame (as well as keeps bomb stock the same).

Funny you should suggest that because I actually tried and got it to work. However, for some very strange reason, after the first 5 hits, CallSpell fails to work. In fact, it then becomes impossible to bomb normally by pressing the bomb button.  I can bomb normally however many times I want. However, after CallSpell is called 5 times, bombs cease to work. This is really bizarre.

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #356 on: May 26, 2012, 11:55:28 PM »
Funny you should suggest that because I actually tried and got it to work. However, for some very strange reason, after the first 5 hits, CallSpell fails to work. In fact, it then becomes impossible to bomb normally by pressing the bomb button.  I can bomb normally however many times I want. However, after CallSpell is called 5 times, bombs cease to work. This is really bizarre.

Sounds as if GetSpellManageObject isn't deleted after you run the spell, perhaps an if-statement that doesn't run >5 times. If this is not the case try posting the script.

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #357 on: May 27, 2012, 06:10:58 AM »
Sounds as if GetSpellManageObject isn't deleted after you run the spell, perhaps an if-statement that doesn't run >5 times. If this is not the case try posting the script.

Here's the entire @Event segment that I have:

http://pastebin.com/hdmhkxmP

I truly have no idea why it only works 5 times.

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #358 on: May 27, 2012, 10:15:13 AM »
Here's the entire @Event segment that I have:

http://pastebin.com/hdmhkxmP

I truly have no idea why it only works 5 times.

I found the problem, it's the Rebirth Frame. The default value to counter bomb is 15, and with each counterbomb it decreases by 3, effectively disabling counterbombing after 5 times. To fix this simply add something like
      SetPlayerRebirthFrame(10);
      SetPlayerRebirthLossFrame(1);   
to EV_REQUEST_SPELL and it should work. For some reason, setting it in Initialize with a loss of 0 doesn't work, as it still goes down. This would also work as a failsafe should a script modify your player's rebirth frame.

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #359 on: May 27, 2012, 02:21:13 PM »
I found the problem, it's the Rebirth Frame. The default value to counter bomb is 15, and with each counterbomb it decreases by 3, effectively disabling counterbombing after 5 times. To fix this simply add something like
      SetPlayerRebirthFrame(10);
      SetPlayerRebirthLossFrame(1);   
to EV_REQUEST_SPELL and it should work. For some reason, setting it in Initialize with a loss of 0 doesn't work, as it still goes down. This would also work as a failsafe should a script modify your player's rebirth frame.
Alright that did it! Thanks a lot, I completely forgot about the rebirth frame decay. It works perfectly now.