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

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #660 on: June 28, 2013, 02:34:08 PM »
In the section of the Option task that sets relativeX and relativeY,  relativeX & Y are supposed to point to the closest enemy (or the boss) if one exists, thus causing the options to home in on the boss. There's just one problem: they never do, and the check for if a boss exists causes an error if no boss exists. I suspect I might be using GetAllEnemyID incorrectly, but...the wiki is no help whatsoever. [...] Then how do I access them? What value corresponds to what? D: Please help!
GetAllEnemyID returns an array in the order that they were created in. If no enemy exists, the array returned is [].

Your options are not moving because every frame you are calling relativeX/Y = GetPlayerX/Y (line 401/402).

edit: (forgot about the boss part)
Instead of checking if GetEnemyBossObjectID is invalid, check if GetEnemyBossSceneObjectID is not invalid, and if it is not invalid, then set the boss object ID. (to be honest i'm not sure why this is done but this is the way i have it in my code and from the example code)
Code: [Select]
if(GetEnemyBossSceneObjectID != ID_INVALID){ID = GetEnemyBossObjectID[0];}
« Last Edit: June 28, 2013, 02:40:52 PM by gtbot »

Nimono

  • wat
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #661 on: June 28, 2013, 05:22:17 PM »
GetAllEnemyID returns an array in the order that they were created in. If no enemy exists, the array returned is [].

Your options are not moving because every frame you are calling relativeX/Y = GetPlayerX/Y (line 401/402).
Oh my GOSH, how did I miss that!? You're a freaking life saver! Thanks so much! :D Now to speed up the movement...ehehe...

Kingault

  • Insert witty description here.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #662 on: June 29, 2013, 03:39:53 AM »
Nevermind, problem resolved.
« Last Edit: June 30, 2013, 06:01:30 PM by Kingault »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #663 on: July 03, 2013, 02:43:29 AM »
http://pastebin.com/CJYWnKM0
I only made a small edit to the default 5-way homing shot, but there is huge hitbox dissonance on the lasers. Is there anything wrong, or is it just that ph3 is still being developed?

Imosa

  • Any sufficiently advanced technology
  • is indistinguishable from magic
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #664 on: July 04, 2013, 03:21:27 PM »
How does danmakufu decide on the size of a bullet's hit circle? Seems like that should be set in the shotData file. I tried using ObjShot_SetIntersectionCircleA1 but that just doesn't seem to work. Also, do you need a shotConst file?

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #665 on: July 04, 2013, 04:03:59 PM »
http://pastebin.com/CJYWnKM0
I only made a small edit to the default 5-way homing shot, but there is huge hitbox dissonance on the lasers. Is there anything wrong, or is it just that ph3 is still being developed?
This looks like a problem with ph3 itself.
How does danmakufu decide on the size of a bullet's hit circle? Seems like that should be set in the shotData file. I tried using ObjShot_SetIntersectionCircleA1 but that just doesn't seem to work. Also, do you need a shotConst file?
I'm not entirely sure, but I think the hitbox is 2/3 the size of the image. ObjShot_SetIntersectionCircleA1 needs to be set every frame to work. shotConst is completely up to your preference and not required, although it makes it easier to remember (261 vs SHOT_COOLSHOT_RED). Take note that the default shotConst file loads the shot data locally (LoadEnemyShotData), so you'll have to load that elsewhere if you choose to not use it.

Imosa

  • Any sufficiently advanced technology
  • is indistinguishable from magic
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #666 on: July 04, 2013, 09:18:56 PM »
I'm not entirely sure, but I think the hitbox is 2/3 the size of the image. ObjShot_SetIntersectionCircleA1 needs to be set every frame to work. shotConst is completely up to your preference and not required, although it makes it easier to remember (261 vs SHOT_COOLSHOT_RED). Take note that the default shotConst file loads the shot data locally (LoadEnemyShotData), so you'll have to load that elsewhere if you choose to not use it.
This may be the most I've ever dislike danmakufu. 2/3 seems to be right.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #667 on: July 04, 2013, 11:45:52 PM »
It can be set in the ShotData using the key collision, it just gives it a certain radius by default if it isn't present.

SetIntersectionCircleA1() and SetShotIntersectionCircle() need to be called per-frame, yes.

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 #668 on: July 14, 2013, 05:52:15 PM »
I looked through this topic about fonts issue and still don't get some parts.
I did some experiments with script under Wine and any font I tried worked fine. When I loaded windows and checked the script, I was surprised to see different font to be used during playing. Some people told that it's AppLocale issue so you have to use Shift-JIS font for that. So, what fonts exactly are Shift-JIS ones? Before I thought that Shift-Jis fonts are those which support Japanese but, for example, Liberation Mono supports it but didn't work in danmakufu (even though I tried to use installfont function, it used some other one which was proportional).
« Last Edit: July 14, 2013, 05:53:47 PM by Vectorfish »
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #669 on: July 14, 2013, 07:28:39 PM »
Wine has always used different fonts for me. When I centered text in PDD, Windows users had half the text not on the screen because they were using a font.

As for Shift_JIS, it's a text encoding, not a font.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #670 on: July 14, 2013, 07:36:07 PM »
As for Shift_JIS, it's a text encoding, not a font.

I was talking about this post:

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

What exactly was meant there?
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #671 on: July 14, 2013, 07:55:42 PM »
He means you need to use a font that is compatible with Shift-JIS encoding. Some fonts do not support the Shift-JIS and those are not usable. The comic sans was a joke.

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #672 on: July 14, 2013, 08:13:35 PM »
He means you need to use a font that is compatible with Shift-JIS encoding. Some fonts do not support the Shift-JIS and those are not usable. The comic sans was a joke.
However, provided Danmakufu is not running with Applocale, ANY font should work, regardless of its encoding.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #673 on: July 14, 2013, 08:29:47 PM »
So how can I know if the specific font is suitable while using AppLocale? I tried several fonts which support Shift-JIS (if the font is capable to show Japanese characters, it supports Shift-JIS, right?) but only native MS Gothic worked, other fonts just were ignored. Sorry if the question looks dumb, I just don't get where I'm wrong.
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #674 on: July 14, 2013, 08:38:35 PM »
So how can I know if the specific font is suitable while using AppLocale? I tried several fonts which support Shift-JIS (if the font is capable to show Japanese characters, it supports Shift-JIS, right?) but only native MS Gothic worked, other fonts just were ignored. Sorry if the question looks dumb, I just don't get where I'm wrong.
Do you need to use applocale? If you remove the default scripts and player then it should run fine with or without it, so long as you don't try to make it read any scripts with Japanese characters in them.

If you must use it, from experience I know that a lot of unicode fonts work with or without applocale so you can try that. Honestly though, your options while using applocale are really limited.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #675 on: July 14, 2013, 08:56:44 PM »
Do you need to use applocale? If you remove the default scripts and player then it should run fine with or without it, so long as you don't try to make it read any scripts with Japanese characters in them.

If you must use it, from experience I know that a lot of unicode fonts work with or without applocale so you can try that. Honestly though, your options while using applocale are really limited.
Hm, so if I completely get rid of Japanese characters from the script, it will work without applocale and, of course, will use any font I'd like, right?
Do I need to remove even Japanese comments or only text input should not contain them?
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #676 on: July 14, 2013, 09:00:28 PM »
However, provided Danmakufu is not running with Applocale, ANY font should work, regardless of its encoding.
Perhaps, but according to Lucas it isn't. Assuming he has researched it. I myself haven't research any of the font area for ph3, so I wouldn't know. We'll have to take his word on it. Also MS Gothic has Shift-JIS compatibility, if we compare it to Lucas' post it should work.



Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #677 on: July 14, 2013, 09:11:46 PM »
Yes, MS Gothic works fine (it was originally used in that script), it just... doesn't look so good, that's why I thought it would be nice to use some other font.
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #678 on: July 14, 2013, 09:13:26 PM »
[I contacted Onthenet about this. Don't know if I should have or not, but he may or may not respond.

Anyways, I'm pretty sure the issue relates to 0.12m as well, since I've had the same problem in 0.12m]

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #679 on: July 14, 2013, 09:14:13 PM »
Hm, so if I completely get rid of Japanese characters from the script, it will work without applocale and, of course, will use any font I'd like, right?
Yes, that's correct. That's what I have been doing.

Do I need to remove even Japanese comments or only text input should not contain them?
I would remove the comments too, just to be safe.

Perhaps, but according to Lucas it isn't. Assuming he has researched it. I myself haven't research any of the font area for ph3, so I wouldn't know. We'll have to take his word on it. Also MS Gothic has Shift-JIS compatibility, if we compare it to Lucas' post it should work.
That post was made when ph3 was in a MUCH older version. Apparently support for non Shift-JIS fonts was added sometime after that. Or else it was a glitch to begin with, I cannot remember which. Regardless, I can confirm that nearly all fonts work now.

Anyways, I'm pretty sure the issue relates to 0.12m as well, since I've had the same problem in 0.12m]
What problem? As far as I remember, you could not install fonts in 0.12m. I don't see how that could be relevant.
« Last Edit: July 14, 2013, 09:16:35 PM by Ozzy »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #680 on: July 14, 2013, 09:17:23 PM »
That post was made when ph3 was in a MUCH older version. Apparently support for non Shift-JIS fonts was added sometime after that. Or else it was a glitch to begin with, I cannot remember which. Regardless, I can confirm that nearly all fonts work now.
That is then great news regarding fonts. Thanks for the heads up. I almost forgot that within these last months, lots of releases has been there for ph3. I wonder if it will leave its beta status soon?

Also unrelated, but a valid question, I noticed the looping function isn't responding proper for BGM/SE. Is this correct?


ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #681 on: July 14, 2013, 09:22:03 PM »
Also unrelated, but a valid question, I noticed the looping function isn't responding proper for BGM/SE. Is this correct?
Which looping function? I have not experimented with PlayBGM myself but as was previously mentioned, sound objects loop just fine, though mp3 files may not work properly (if at all). Ogg files seem to be preferred. Also ObjSound_SetLoopTime does not usually result in flawless looping. ObjSound_SetLoopSampleCount is a far more precise alternative. Instead of using seconds, it uses samples. Using audacity or similar programs you can see the sample count at any point during the track, and use that for the information to provide in the function.

Funny how this comes up, as I just tried all of this for the first time today and it worked wonderfully.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #682 on: July 14, 2013, 09:24:45 PM »
Those are indeed the functions I am mentioning. OGG is preferred huh? I remember how in 0.12m OGG was dangerous to use with incorrect formats (Mecha Kisume script...).

I assume the same goes for the Volume rate, it seems to be behaving odd when using mp3s. I tried volume rate 50, but it was like near quiet when 90 was quite soft already. (Parameter for it says between 1-100).

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #683 on: July 14, 2013, 09:26:07 PM »
I assume the same goes for the Volume rate, it seems to be behaving odd when using mp3s. I tried volume rate 50, but it was like near quiet when 90 was quite soft already. (Parameter for it says between 1-100).
I never quite understood what was up with the volume rate, as 50 was basically silent like you said. I wonder if that differs when using different file formats, ill have to experiment with that.

Edit: Oh I should also say that ogg files seem to be preferred when LOOPING. For ordinary use, mp3s are just as good.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #684 on: July 14, 2013, 09:36:53 PM »
Yes, that's correct. That's what I have been doing.
I would remove the comments too, just to be safe.
I see, thank you. I'll check it when I will have enough data to replace. Meanwhile, I'll look for Japanese text which definitely should be translated.
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #685 on: July 14, 2013, 09:49:14 PM »
0.12m fonts: Danmakufu run with Wine would have glitchy fonts; I'm not referring to the installation of fonts. It just had problems with fonts anyways.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #686 on: July 20, 2013, 07:39:08 PM »
I was fooling around with the draw/view distances in ph3 and I noticed the distance for drawing sprite objects is logically low.

In 0.12m, this was manipulatable with SetPerspectiveClip(param1,param2); though I cannot seem to really detect/figure out it ph3. I think I'm missing it on the wiki, but couldn't locate it.

Edit:
Quote from: 0.12m documentation from official site
SetPerspectiveClip(引数:2)
 1) 近クリッピング距離 (初期値10)
 2) 遠クリッピング距離 (初期値1500)
パースペクティブ射影行列変換時のクリップ距離を指定します。
近クリップより近いものと遠クリップより遠くのものは描画されません。

    ph3にはありません。

Well *****. I sent the author an e-mail asking about this. It makes no sense at all to me.



Also unrelated to my question, the sphere-camera in ph3 is wrong in terms of logical. It is using azimuth, angular altitude and horizon radius for 3DCamera.


Except the observer point isn't you, but the star is. Star player da ze!

Edit2: Actually, regarding the sphere-camera thing. It would make sense if the stage is drawn at the "star" I guess? Or ----- I am so confused. Oh well, awaiting reply from author.

Edit 3:
Received E-mail from the author. He says it is indeed non-existent feature in ph3. It will be implemented in the next version.
« Last Edit: July 21, 2013, 02:50:28 PM by Helepolis »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #687 on: July 22, 2013, 10:27:28 PM »
Apologies, please ignore this post. I figured out the error, but I don't know how to delete this, so... Yes, please ignore this.
« Last Edit: July 22, 2013, 11:05:11 PM by Sakkeru »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #688 on: August 01, 2013, 11:27:50 AM »
I did some heavy digging in the ph3 structure to grasp the way it all is tied together. Mainly with the spell background and effects, it is required for my tutorial so I was wondering if these are correct.

I've noticed that if the #System header is void then default_system.txt will be called. This file contains the standard effects and drawing for boss lifebar, playerscore, timer, etc etc. First of all, compared to 0.12m, there is no @BackGround routine, however two separate tasks listening to a boolean inside Default_Background_IceMountain.txt.

If no Background header is provided, no spellcard background animation will be used at all. The magic circle shown around the boss is a default effect which can be always called.
Code: [Select]
let objScene = GetEnemyBossSceneObjectID();
ObjEnemyBossScene_StartSpell(objScene);
is a simple example in Rumia which gets the bossID and then start a scene on that ID. Default_System.txt listens with the Event case(EV_START_BOSS_SPELL) and kicks the Default_System_MagicCircle.txt spell card. It is important to keep the spellcard BG and magic circle strictly separated during our mind breaking process.

First of all, when the background txt is called, two tasks are called: NormalBG and SpellBG who listen to the boolean bSpell. This boolean is set inside the @MainLoop routine which constantly listens whether a spell card is called or not.
Code: [Select]
if(objScene != ID_INVALID && ObjEnemyBossScene_GetInfo(objScene, INFO_IS_SPELL))ObjEnemyBossScene_StartSpell(object); & INFO_IS_SPELL are tied together. So the value is true and based on this, the bSpell boolean is set to true or false. The two tasks being called are listening non-stop to this boolean and are looping infinitely until the script is closed. This is why you can for example during plurals have easier background swapping.

I hope I managed to explain it correctly and this will perhaps give insight for people who wish to alter the effects.

You could of course always draw your own background by simply leaving #system header out, providing no #background header and creating a simple 2D sprite on Layer 20. Anything is possible but understanding the game structure is never a bad thing.

Byronyello

  • "The Western Non-Otaku That Respects and Likes Touhou"
  • I guess that'd be my title in a Touhou game...
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #689 on: August 07, 2013, 06:23:08 AM »
Forgive me if I'm missing something simple, but as far as I can see there isn't a SetAlpha function for bullet objects, so I'd like to know two things:
1: Am I blind?
2: If not, how does one make one's bullets have transparency?
(Strike-through indicates a clear)
Hard Clears: EoSD, PCB, IN, MoF, SA, UFO, TD, DDC.
Lunatic Clears: Someday, perhaps.
Extra Clears: EoSD, PCB, PCB Phantasm, IN, MoF, SA, UFO, TD, DDC.