Author Topic: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry  (Read 243833 times)

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #630 on: July 18, 2015, 01:06:56 PM »
Maybe it's not the good thread for this but, is there somewhere I can find all (or at least almost all) the non offcials CtC Touhou sprites? I found only the kirbio's sprites on MoK.
Or at least if you have a Koishi CtC style sprite ><
Thanks.

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #631 on: July 18, 2015, 07:32:58 PM »
Where can PlaySE be called and actually play a sound?
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #632 on: July 18, 2015, 10:16:03 PM »
Where can PlaySE be called and actually play a sound?

Anywhere, as long as it is given a legitimate path to a legitimate sound file that has been loaded using LoadSound()

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #633 on: July 19, 2015, 09:35:06 PM »
Anywhere, as long as it is given a legitimate path to a legitimate sound file that has been loaded using LoadSound()

I used LoadSound() in the system script and the sound still doesn't play. I'm pretty sure I'm feeding it legitimate paths.
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #634 on: July 20, 2015, 12:45:41 AM »
I used LoadSound() in the system script and the sound still doesn't play. I'm pretty sure I'm feeding it legitimate paths.

are you using PlaySound()? Because LoadSound can be called anywhere. As long as the path is not a non-global variable, it should work.

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #635 on: July 20, 2015, 12:46:36 AM »
are you using PlaySound()?

Actually, that function doesn't exist. Did you mean PlaySE()?
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #636 on: July 20, 2015, 12:47:52 AM »
Actually, that function doesn't exist. Did you mean PlaySE()?
Ah yes, apologies, I actually have touched that since I made my own library for it.

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #637 on: July 20, 2015, 09:40:25 AM »
Did you load the sound in the system script but try to play it from a different script? Because the loaded sound's ID won't be accessible from another script.

Can you get a minimal example working, at least?

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

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #638 on: July 21, 2015, 12:02:01 AM »
[in response to deleted post]
You can't use textures loaded from one script in another script either, and I'm sure you're fine with that.

LoadSound(), PlaySE(), etc probably use one sound manager, and it's limited to begin with. Manipulating Sound objects is usually preferable, and you probably won't screw up that way, since you already know you won't be able to use the object in other scripts unless they know the Sound object's ID. However, because you'd have to manage the objects and the loaded resources yourself, it's more prone to wasteful usage if you aren't careful, of course.
« Last Edit: July 25, 2015, 05:19:32 PM by Drake »

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #639 on: July 23, 2015, 05:04:14 PM »
 ??? HELP!
I wrote a Package script, and it works normally, ok.
But, when I start playing threw the "th_dnh.def", it starts normally, but can't begin the game, because he cannot find a player.
I have no idea where is the problem.

Edit
~ How works SetCommonData? ~
There is no tutorials for this. I tried to understand how it works from other scripts. But it does no matter. Could somebody tell me please, how it works? (I want to make a Language selection)
« Last Edit: July 25, 2015, 08:24:31 PM by Helepolis »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #640 on: July 25, 2015, 05:21:59 PM »
SetCommonData works exactly like in 0.12m.  You set a key and a value for it and you can retrieve that value or manipulate it by setting it again.

Example:
Code: [Select]
SetCommonData("spellcard",5);
let getcards = GetCommonData("spellcard",0);

If you debugtext getcards (or the commondata), you will see that the value should be 5. If for some reason, when GetCommonData is called, cannot retrieve the value, it will return the default value, in this case 0.

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #641 on: July 25, 2015, 05:31:35 PM »
??? HELP!
I wrote a Package script, and it works normally, ok.
But, when I start playing threw the "th_dnh.def", it starts normally, but can't begin the game, because he cannot find a player.
I have no idea where is the problem.
Did you set a stage and player script to run using SetStageMainScript() and SetStagePlayerScript()? When running a stage from the default script select menu you can choose your character, but if you're running a package script, you can't do that. You have to tell the package script which player script you want to use for the stage.

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #642 on: July 25, 2015, 06:35:00 PM »
Did you set a stage and player script to run using SetStageMainScript() and SetStagePlayerScript()? When running a stage from the default script select menu you can choose your character, but if you're running a package script, you can't do that. You have to tell the package script which player script you want to use for the stage.
Yes I set both of them. I'm using Package script.
When I run script from simple touhou.exe (as usual) it runs properly, and finds all players.
But when I'm running threw th_dnh.def, he writes that there is no player found.

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #643 on: July 25, 2015, 06:42:38 PM »
Could you please put your package script and .def file in a pastebin?

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #644 on: July 25, 2015, 06:49:05 PM »
SetCommonData works exactly like in 0.12m.  You set a key and a value for it and you can retrieve that value or manipulate it by setting it again.

Example:
Code: [Select]
SetCommonData("spellcard",5);
let getcards = GetCommonData("spellcard",0);

If you debugtext getcards (or the commondata), you will see that the value should be 5. If for some reason, when GetCommonData is called, cannot retrieve the value, it will return the default value, in this case 0.

Problem is that I don't really understand how SetCommonData works even in 0.12 (._.)
Soooo, I want to make two languages, it means that I should do:
SetCommonData("language","english");
SetCommonData("language","japanese");
And when I need to write a text, I should write:
if(GetCommonData("language","english"){ text="hello" }
?

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #645 on: July 25, 2015, 06:50:39 PM »
Could you please put your package script and .def file in a pastebin?
Ok (^_^'), just a moment...

edit

Could you please put your package script and .def file in a pastebin?
It quite messy, sorry :0
Error in a row 824
pastebin.com/Hn1acQ1W (Package script)
pastebin.com/2g4YzDB4 (Def)


Please use the edit button if you're the last poster, unless there is a very good reason for double posting. Otherwise I see none. -Hele
« Last Edit: July 25, 2015, 08:24:13 PM by Helepolis »

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #646 on: July 25, 2015, 08:10:50 PM »
Quote
And when I need to write a text, I should write:
if(GetCommonData("language","english"){ text="hello" }
Nope. You must write:
if(GetCommonData("language","english") == "english") { text="hello" }
"language" is the name of the common data.
the first "english" is the default value of the common data
the second "english" is what you check with the if.

CommonData are used to store numbers, texts, arrays, variables values, etc. and share them between differents scripts/task/fuction (or in the same script.task/function) with GetCommonData and SetCommonData.

The arguments of SetCommonData are the name of the CommonData and the value of the CommonData.
The arguments of GetCommonData are the name of the CommonData and the default value returned if the CommonData has no value.

Is it clearer now?

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #647 on: July 25, 2015, 10:45:00 PM »
Nope. You must write:
if(GetCommonData("language","english") == "english") { text="hello" }
"language" is the name of the common data.
the first "english" is the default value of the common data
the second "english" is what you check with the if.

CommonData are used to store numbers, texts, arrays, variables values, etc. and share them between differents scripts/task/fuction (or in the same script.task/function) with GetCommonData and SetCommonData.

The arguments of SetCommonData are the name of the CommonData and the value of the CommonData.
The arguments of GetCommonData are the name of the CommonData and the default value returned if the CommonData has no value.

Is it clearer now?

Oh, thanks! :D much better.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #648 on: July 26, 2015, 12:53:21 AM »
Hi,
  I'm pretty new to Danmakufu ph3 and I don't have any experience with coding. I tried making a simple script of just the boss and no bullets but, an error message came up:

Unable to be interpreted (Don't forget ";"s).
(解釈できないものがあります(「;」を忘れていませんか))
C:/Users/hp/Desktop/th_dnh_ph3/script/My scripts/Reference.txt
Reference.txt line(行)=16


      case(EV_REQUEST_LIFE)
   {
      SetScriptResult(100);
   }

}

According to a thread by Blargel, I wrote something really weird, which means I messed up. I don't know what I wrote weird though. I was following Sparen's tutorials and I wrote word to word according to what he said but, I don't know what I wrote weird ;_;



Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #649 on: July 26, 2015, 06:34:29 AM »
You'll need to post your full script in pastebin.com link for review, but ph3 already is returning you possible mistake:  Unable to be interpreted (Don't forget ";"s).

Sounds like a missing semicolon.

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #650 on: July 26, 2015, 07:07:34 AM »
Ok, that's a slightly nonobvious problem (assuming this is actually the problem). When using SetStagePlayerScript(), the only valid player scripts that you can use are the ones you list in the package script's #Player header. If you don't have a #Player header, it defaults to #Player[ALL], which contains only the player scripts under the script/player folder. Since your player scripts aren't there, it will tell you none are available.
Add a #Player["./Reimu/Reimu.txt"] to the package script and try that.

If that doesn't work, can you:
1) List what player scripts you have in the script/player folder
2) Explain what happens when you launch th_dnh main menu (without a .def) -> select Package -> start your script and keep going until it errors

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #651 on: July 26, 2015, 04:10:09 PM »
Ok, that's a slightly nonobvious problem (assuming this is actually the problem). When using SetStagePlayerScript(), the only valid player scripts that you can use are the ones you list in the package script's #Player header. If you don't have a #Player header, it defaults to #Player[ALL], which contains only the player scripts under the script/player folder. Since your player scripts aren't there, it will tell you none are available.
Add a #Player["./Reimu/Reimu.txt"] to the package script and try that.

If that doesn't work, can you:
1) List what player scripts you have in the script/player folder
2) Explain what happens when you launch th_dnh main menu (without a .def) -> select Package -> start your script and keep going until it errors

I tried, but it just turned off. Maybe I should send you a hole script  :|
That will be easier.
Always problem is in "couldn't find a player".
Even the path is right.
if (as an alone folder) {
1) Reimu, Marisa by Mr. Blue
2) (with .def only) I turn on game.Menu "Play". Rank Select "Normal", Player Select "Reimu", and when the game should be started, it just turn off.
}
if (in normal ph3 folder, with all projects) {
1) Too many players, but Reimu and Marisa (by Mr. Blue) included.
2) (without def) Plays all normal.
« Last Edit: July 26, 2015, 04:16:04 PM by Zhan_fox »

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #652 on: July 26, 2015, 09:43:31 PM »
Hello. I've been having some problems with Danmakufu now.
I'm almost finishing my script [with 4 difficulties and 2 extra spells in Single], but, for some reason:

1. The script does not automatically end on the 4 difficulties.
2. The extra spells are crashing Danmakufu when Remilia's HP reaches 0.

The scripts are here: http://pastebin.com/jMhSCDbj and http://pastebin.com/0YaTEhFv

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #653 on: July 27, 2015, 05:47:30 AM »
Hello. I've been having some problems with Danmakufu now.
I'm almost finishing my script [with 4 difficulties and 2 extra spells in Single], but, for some reason:

1. The script does not automatically end on the 4 difficulties.
2. The extra spells are crashing Danmakufu when Remilia's HP reaches 0.

The scripts are here: http://pastebin.com/jMhSCDbj and http://pastebin.com/0YaTEhFv
- You're not closing the the script in your finalize, just summoning an explosion after the boss HP reaches 0.
- Take a closer look at your MainTask. How does the MainTask "walkthrough" the code if you were to say out loud what is all happening there. What do you think what happens when the HP is 0 or lower?

« Last Edit: July 27, 2015, 05:50:12 AM by Helepolis »

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #654 on: July 27, 2015, 09:06:55 PM »
- You're not closing the the script in your finalize, just summoning an explosion after the boss HP reaches 0.
- Take a closer look at your MainTask. How does the MainTask "walkthrough" the code if you were to say out loud what is all happening there. What do you think what happens when the HP is 0 or lower?

- Changed the Finalize to others Singles' Finalize, but the Plural still didn't finish.
- Oh wait...just now I noticed it was the second "while(HP>0)" on MainTask that was crashing Danmakufu. Well, regardless of what you were trying to point out [unless if it was exactly the second "while(HP>0)"], thanks! ^.^

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #655 on: July 28, 2015, 05:43:39 AM »
- Changed the Finalize to others Singles' Finalize, but the Plural still didn't finish.
I am confused, plural? Do these cards end when you play them separately but not in plural? I think you're missing the point about closing scripts. In both your posted pastebin links, I cannot track the function to close scripts.

Spoiler:
Hint: CloseScript(); function

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #656 on: July 28, 2015, 04:56:30 PM »
I am confused, plural? Do these cards end when you play them separately but not in plural? I think you're missing the point about closing scripts. In both your posted pastebin links, I cannot track the function to close scripts.

Yes, they do end in Single, but the Plural doesn't end after the last spell finishes. (And I knew that function already :P)
Shall I give you the Plural code?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #657 on: July 28, 2015, 07:31:33 PM »
Please do so. I mean, we're staring at a problem here where you're only giving us guessing work instead of the full thing.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #658 on: July 28, 2015, 07:48:57 PM »
Welp, if so, then I'll post the Explosion Effect text too.

Explosion effects - http://pastebin.com/Ffc5x75k
Plural [Normal] - http://pastebin.com/hJvYL5Yu (Forgot to change title...  :V)
Updated Remilia's last spell - http://pastebin.com/AUzXH1XZ

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #659 on: July 28, 2015, 07:57:49 PM »
Where are you setting CommonData for EndScript? Because it suddenly pops there in your plural. I hope you realise that if the commondata cannot return a value it will return its default value meaning your plural will technically never end. You're also nowhere mutating this value in your single scripts.

Edit:
Also interesting method on "yielding" your plural, but it isn't really efficient and as I can see only causing trouble. It would be easier and better if you used while(!Obj_IsDeleted(<yoursceneobj>) { yield; } . Since you're using objects, it is more effective to work with them. That way you don't have to use CommonData.
« Last Edit: July 28, 2015, 08:01:00 PM by Helepolis »