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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #420 on: March 10, 2015, 08:54:35 PM »
I think you two are actually forgetting to actually proper answer the post by adding unnecessary (imo) explanations for now. Not that you're wrong with your posts or did something bad, but the core question was: "Is there a event like script in ph3", not whether he wanted to use libraries or text objects. Let us try to answer the questions accurately  ;)

Let us also refrain from immediately being stepped on our toes about nothing when the user haven't actually 'used' or 'borrowed' any thing yet. I am pretty sure it is common sense to ask permission for materials. And even if the user did 'steal', I prefer to see it handled in a mature way.


To answer the question, Zhan: Unfortunately, no. Ph3 has no similar functions like 0.12m.

You'll need to create your own Dialogue script including everything from swapping faces to putting text on your screen. As you might have realised, this is quite the effort indeed. You're indeed going to use 2D sprite functions for the portraits and either sprite based text or Text Objects like suggested.
« Last Edit: March 10, 2015, 08:56:49 PM by Helepolis »

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #421 on: March 10, 2015, 09:03:43 PM »
Big thanks for all  :)
I will try to make my own library  :o
That nobody would be angry~

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #422 on: March 13, 2015, 08:50:37 PM »
Apparently there seems to be a limit to the number of characters you can display in your LogWindow for ph3. I was happy putting the following Array in my commonData.
Code: [Select]
  SetAreaCommonData("core","Normal",[
   [[0,0,0],[0,0,0],[0,0,0],[0,0,0]], 
   [[0,0,0],[0,0,0],[0,0,0],[0,0,0]], 
   [[0,0,0],[0,0,0],[0,0,0],[0,0,0]], 
   [[0,0,0],[0,0,0],[0,0,0],[0,0,0]],
   [[0,0,0],[0,0,0],[0,0,0],[0,0,0]],   
   [[0,0,0],[0,0,0],[0,0,0],[0,0,0]]
  ]);

When I tried to happy view the log window, ph3 crashed. I thought I made the array wrong but that is a negative as long as I don't touch the window everything runs fine.

So! I checked out the following things by adding x-number of characters in a CommonData and checking the log Window. the commondata used was SetAreaCommonData("testarea","test","X-characters"); as a string.
500 characters > Crash
400 characters > Crash
256 characters > Crash
255 characters > Crash
200 characters > Works fine.

Assuming the limit is between, I didn't arse myself to find the exact value. It already pissed me off that I couldn't work with arrays like this. Next attempt was test on regular number instead of string.  SetAreaCommonData("testarea","test",0000etc...);
200 characters > Crash
100 characters > Works fine but the result is interesting. I used: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

And the log window is like this:


So yeah, there you have it folks. Becareful when using arrays and commondata or large number of characters + you want to use the LogWindow.
« Last Edit: March 13, 2015, 08:52:34 PM by Helepolis »

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #423 on: March 13, 2015, 08:58:11 PM »
As for the number, that's because you've hit the limit of how large numbers can get. It's just so big that the accuracy is actually off by that much.

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

FlareDragon

  • Gensokyo's Infernal Hellstorm
  • When will you come to Gensokyo, Satsuki Rin?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #424 on: March 16, 2015, 02:48:16 AM »
This might seem like an odd question, but could an event be describe within a task, or rather called by a task. An example:
Example Script
Code: [Select]
...
@Event{
    runEvent;
}
...
Example Separate Script
Code: [Select]
task runEvent{
    alternative(GetEventType())
    case(EV_REQUEST_LIFE){
        SetScriptResult(1500);
    }
    case(EV_REQUEST_TIMER){
        SetScriptResult(60);
      }
}

The reason I'm asking is because I'm attempting to create a shortcuts "script" so I can use it as templates whenever I make a new script and don't have to re-type it for each new script. Also, if this is actually a bad idea, be sure to tell me so I know it's a bad idea XD
Normal 1CC's: SoEW, LLS, MS, EoSD, PCB, IN, PoFV, MoF, SA, UFO, GFW, TD, HM, DDC, ULiL, LoLK(PD), CtC |IaMP|
Hard 1CC's: EoSD, PCB, MoF, IN(B), TD, LoLK(PD), |???|
Lunatic 1CC's: None
Extra 1CC's: SoEW, MS, EoSD, PCB, IN, PoFV, MoF(NB), SA, UFO, GFW, TD, DDC, CtC, LoLK, |???|

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #425 on: March 16, 2015, 03:26:10 AM »
You don't use a task; @Event is already a routine that runs every frame an event occurs, so there's no purpose in creating an extra thread for it. It'd be even worse if you had looping yields in it, since not only does @Event not even run every frame, but it would also spawn that task every time an event occurred, which would be hilariously bad.

The answer is yes, but just use a function/subroutine instead. In most cases this is a bit iffy just because you don't usually want to have the same events and results for every script, but if it works for you then sure.

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

FlareDragon

  • Gensokyo's Infernal Hellstorm
  • When will you come to Gensokyo, Satsuki Rin?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #426 on: March 16, 2015, 03:52:19 AM »
You don't use a task; @Event is already a routine that runs every frame an event occurs, so there's no purpose in creating an extra thread for it. It'd be even worse if you had looping yields in it, since not only does @Event not even run every frame, but it would also spawn that task every time an event occurred, which would be hilariously bad.

The answer is yes, but just use a function/subroutine instead. In most cases this is a bit iffy just because you don't usually want to have the same events and results for every script, but if it works for you then sure.
*facepalm* When I said task, I meant function. Whoopsy me >n<
Also, the function would have arguments so that they could be different for each script (and thanks for the swift answer)

And I guess I learnt something new too: @Event runs every-time an event occurs, not simply the once at the beginning. ^u^
Normal 1CC's: SoEW, LLS, MS, EoSD, PCB, IN, PoFV, MoF, SA, UFO, GFW, TD, HM, DDC, ULiL, LoLK(PD), CtC |IaMP|
Hard 1CC's: EoSD, PCB, MoF, IN(B), TD, LoLK(PD), |???|
Lunatic 1CC's: None
Extra 1CC's: SoEW, MS, EoSD, PCB, IN, PoFV, MoF(NB), SA, UFO, GFW, TD, DDC, CtC, LoLK, |???|

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #427 on: March 16, 2015, 04:06:36 AM »
Specifically it's run every time that particular script has been notified an event has occurred, so sometimes it will run multiple times in one frame. Some events don't trigger @Event in some scripts, like EV_GRAZE only triggers the player script's @Event, and EV_GET_ITEM only triggers player scripts and item scripts. It's also the difference between NotifyEvent() and NotifyEventAll().

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #428 on: March 16, 2015, 11:47:05 AM »
I have a question regarding the User Interface and Replay system for ph3. I know in particular the Locaa folks are far more advanced and experienced with the UI and replay system so hoping they might teach me in this. I have studied and made menu system for the game but the replay system seems to be confusing the hell out of me.

Studying Rumia's sample and digging through the endless acronyms and style isn't helping. In desperation I was considering on temporary copy-pasting Rumia's method and crediting (if I were to run out of time), but since there is some time left I was wondering if it is able to get done in a fashionable way.

I have honestly no idea where to start with the replay saving screen + Replay listing screen. Could perhaps someone explain me which essential functions I need to use or what the actual "structure" is for a replay save / display / load menu?

Thanks

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #429 on: March 16, 2015, 02:19:14 PM »
I have a question regarding the User Interface and Replay system for ph3. I know in particular the Locaa folks are far more advanced and experienced with the UI and replay system so hoping they might teach me in this. I have studied and made menu system for the game but the replay system seems to be confusing the hell out of me.

Studying Rumia's sample and digging through the endless acronyms and style isn't helping. In desperation I was considering on temporary copy-pasting Rumia's method and crediting (if I were to run out of time), but since there is some time left I was wondering if it is able to get done in a fashionaaabluh way.

I have honestly no idea where to start with the replay saving screen + Replay listing screen. Could perhaps someone explain me which essential functions I need to use or what the actual "structure" is for a replay save / display / load menu?

Thanks

Personally, I based everything off of the sample/default scripts, and all I did was implement functionality for replay comments (AKA saving difficulty, effect settings, etc. to a replay in order for those to be loaded correctly). Most of the code refers to the menu, and all of the basic functions required for the replay to function correctly are in the sample scripts as well. I'd say to use the sample scripts and build on that, because for the Replay Save Scene and the Replay Select Scene, most of the code is already provided, and all you need to do is understand how it works.

Personally, replays were one of the most annoying things to get working, and my replay select scene looks terrible, though that's my issue

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #430 on: March 16, 2015, 04:30:56 PM »
Personally, instead of using replay comments, I have a common data that saves difficulty and player options, and I run Save/LoadCommonDataAreaToReplayFile first thing in the system script, and differentiate game playing/replay playback by using the IsReplay function.

The way the default Rumia scripts work is with a SetScriptResult system -- this is because the non-package menu scripts (pause, end scene, replay save scene) are handled by Danmakufu during a Single/Plural/Stage, but in a Package, you'll have to deal with it yourself (it's not much more code though).

For replay saving, SaveReplay is really all that's needed. Most of the code in the Rumia replay save scene is for displaying the GetReplay info (so the player can select which replay index to save to) and the name input keyboard (to input the replay's name).

It gets a little weird for replay playback, though. The ExRumia package and replay select was made with only ExRumia as the player in mind (kinda weird since everything else is sort of flexible). The way the ExRumia select scene script works is, it displays all the replays using GetReplayInfo, and once the player makes a selection, it will send back the path to the replay back to the package. The ExRumia package will then start the stage using the replay from the results of the select scene script (or if user cancelled, back to main menu). The stage scene in the ExRumia package always sets Default_Player_Rumia.txt as the player. If you're going to be having multiple players, you're going to exclude the SetStagePlayerScript function. The SetStageReplayFile function seems to set the player for you already, and if you try to "replace" it, you'll get errors thrown back at you. Otherwise, the setup is the same as if you were playing the game.

I don't know exactly how stage indices work for replays, since I haven't worked with those. It is possible to start replays at specific stages though.


To answer your question more concisely, SaveReplay, GetReplayInfo, SetStageReplayFile are the most essential functions. Saving the replay will need the index to save to, and the name to save it as. For displaying replays, you'll use the information from GetReplayInfo to create strings that'll relay the replay's information to the player. For playback, after the player has chosen a replay, you will then take the path of the replay and use it on the SetStageReplayFile function, with mostly the same setup as if you were playing the game; exceptions include excluding SetStagePlayerScript, and changing your pause/endscene menus to reflect the fact that it's a replay (you don't want to save a replay after watching a replay).

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #431 on: March 16, 2015, 06:38:18 PM »
@ Sparen & gtbot,  Hmmm, I don't intend to implement anything flashy or over the top. It is a replay screen after all and such improvements can be done later anyway. I rather focus on the core content and mechanics.

Exclude the SetStagePlayerScript? I assume that the replay file stores all values about the player and such, meaning your emphasis on "trying to replace" is the problem here right?  So that makes me think I need to check whether a replay menu has been loaded before the Stageplay is launched. That shouldn't be hard in my current structure as the loading is only 1 line so check around it should be minimum effort.

FinalizeStageScene has been marked on the wiki defining the ending point for a replay. Though that means you shouldn't be calling FinalizeStageScene in between the stage jumps, unless the player died/game over'd.

So to put it more into structure and to see if I understood this:
- The Replay playback menu is nothing more than retrieving all replays stored by using the GetReplayInfo in an iteration?
- SaveReplay is more than enough to technically save the replay but for "naming" purposes, an extra menu can be overlayed to type in playername or replayname?
- SetStagePlayerScript function should be excluded when a replay is initiated.
- SetStageReplayFile will kick off the replay. Path seems to the replay, but do I need to set the stage index before this?

To provide bit more technical info about my game structure:
- I only have 1 stage file which contains 3 functions/subroutines listening to a parameter. Basically  renderStage(stgnum)  >   if(stgnum == 1) { stg1 stuff } (ry
- Plurals are loaded within the stage files as common.
- There are two 'heartbeat' tasks which perma checks the state of the player and if you died. One is inside the Stagelauncher "pack" (not the stage structure)  and other inside the actual stage script.
- The first heartbeat listens to pausing, ending and such. The second heartbeat checks player status during stage play.
- Stage jumping is done by calling CloseStg at the end of the subroutine for my stage
- The stage pack heartbeat is triggered with STAGE_RESULT_CLEARED and will toss in an Ending Screen then check what the current stage index is. If it is last stage > launch all clear menu. Otherwise, increment index and re-initialize stage which is basically:
Code: [Select]
InitializeStageScene;
SetStageIndex(stgIndex);
SetStageMainScript("stagescript.txt");
SetStagePlayerScript;
StartStageScene;

Will any of the above influence my replay implementation?

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #432 on: March 16, 2015, 07:38:52 PM »
Im on mobile atm so excuse this messy post but replays are influenced by ingame elements only, outside data shouldn't be a problem. A replat menu is a menu that obtains all replay files and such, the save screen is the same but implemented slightly differently.

You use the getreplayinfo function to obtain the stage index data which returns an array for the score between each stage, telling the game what stage to load during a replay is just passing the correct stage index value before starting the stage using the setreplayindex function. I'll elaborate more when i get home.


Ok time to actually go into detail on how each menu work and how to get a replay to start from any stage.


For the replay select menu you'll need:
LoadReplayList(); This seems to just load all of the current replays in the replay folder into the game's memory, call it before doing anything else

GetValidReplayIndex(); Similar to the previous function but this returns the array of replays loaded, if a replay was saved on index 0 and another on index 3, indices 1 and 2 will return as invalid when using the IsValidReplayIndex() function.

Finally, you obviously need the GetReplayInfo(valid index,info type); function. Use this to append information about a replay to strings and display them as text objects or spritefonts if you use those instead.

The Replay Save menu is exactly the same except for the if statement that will control what happens when you press the OK button (Z), this is where you calculate and merge the data you need to grab from the replay when its time for the game to be loaded.
You can use the SaveAreaCommonDataToReplay(); function or SetReplayInfo(REPLAY_COMMENT,string of data); function (Safer but abit harder to manage). Make sure the string separates the data by a delimiter so that you can use SplitString(string, delimiter);.

That may be abit hard to understand just by word only, I don't have time to conjure up a tutorial however, I can upload the replay menus for MMS.
« Last Edit: March 17, 2015, 01:23:33 AM by Sage Ω (Ultima) »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #433 on: March 17, 2015, 06:41:54 AM »
Cheers, I will try to give it a go this week definitely and report whether I succeeded or not.

FlareDragon

  • Gensokyo's Infernal Hellstorm
  • When will you come to Gensokyo, Satsuki Rin?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #434 on: March 17, 2015, 08:40:49 AM »
I've got another question (and this one might seem silly):
What is CommonData, what is it used for and how is it used?
I'm trying to learn aspects of Danmakufu and this one feels important to learn, but the wiki isn't helping me on the subject.
Normal 1CC's: SoEW, LLS, MS, EoSD, PCB, IN, PoFV, MoF, SA, UFO, GFW, TD, HM, DDC, ULiL, LoLK(PD), CtC |IaMP|
Hard 1CC's: EoSD, PCB, MoF, IN(B), TD, LoLK(PD), |???|
Lunatic 1CC's: None
Extra 1CC's: SoEW, MS, EoSD, PCB, IN, PoFV, MoF(NB), SA, UFO, GFW, TD, DDC, CtC, LoLK, |???|

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #435 on: March 17, 2015, 06:45:43 PM »
I've got another question (and this one might seem silly):
What is CommonData, what is it used for and how is it used?
I'm trying to learn aspects of Danmakufu and this one feels important to learn, but the wiki isn't helping me on the subject.
CommonData is a function which allows you to communicate across scripts (mainly) or tasks/functions which aren't included/related directly in ph3. Normally you would need to include scripts to call variables from there (if global). CommonData is stored in the "memory" during the entire "play" and is active once it is called/set.

SetCommonData(<string>,<value>); is your starting point for example. The string parameter is the commondata identifier. The value can be a bool, int or string. The value can be called by using GetCommonData(<string>,defaultvalue>); The default value is always returned if the CommonData could not find a valid value from the SetcommonData.

A good example which was "common" in 0.12m was setting menu difficulty. Let us say you want to set the difficulty and call this value regardless of which script is running/closed. CommonData would be most useful here.
SetCommonData("difficulty","easy"); next, in some other script where you call enemy patterns, you want to know what the difficulty setting is:
if(GetCommonData("difficulty","easy") == "normal") { }   <-  will check if the commondata "difficulty" equals "normal". The defaultvalue is only retrieved if the commondata was "invalid", but since it has a value it will not return easy. You could also make it return something else like 'false'. But the default value might be useful in some cases.

Another example would be player power:
Code: [Select]
SetCommonData("playerPower",100);
// player picks up a P.
let power = GetCommonData("playerPower",0);
power++;
SetCommonData("playerPower",power);

Above example summons a commondata named playerPower with starting value of 100. In some P-pickup event, I retrieve the value and store it inside temp variable called: power (for easier calc). Next, the powervar is incremented once. So the value of power = 101. The power var is then stored again in the commondata under the same name. The old value will be overwritten and thus if you check your logwindow, you will notice playerpower became 101.

If playerpower was never set, like it didn't exist then the default value retrieved would be 0. Thus power would be 0 and incremented once becoming 1. So the new commondata would be 1. Simple as that.

Regular CommonData is also cleared from the "memory" when your running game/script is closed (i.e unloading back to menu in ph3). In the CommonData tab in Logwindow (activate it if you don't have it) you can see the results.

Logically there is more too it like saving your commondata and such, but baby steps are advised. Ph3 also empowers the use of CommonData by allowing you to use commondata areas, which is basically categorizing your commondata more efficiently. But that is one another step next. Try to fiddle around with the above first.



Edit quick question

Has anybody ever fiddled with INFO_IS_DURABLE_SPELL ? This:
Code: [Select]
@Event {
alternative(GetEventType())
case(EV_REQUEST_IS_DURABLE_SPELL) {
SetScriptResult(true);
}
}
Does not return 'true' when I check ObjEnemyBossScene_GetInfo(bossObj,INFO_IS_DURABLE_SPELL) with text object. Am I missing something?
« Last Edit: March 17, 2015, 09:54:33 PM by Helepolis »

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #436 on: March 17, 2015, 11:24:01 PM »
Edit quick question

Has anybody ever fiddled with INFO_IS_DURABLE_SPELL ? This:
Code: [Select]
@Event {
alternative(GetEventType())
case(EV_REQUEST_IS_DURABLE_SPELL) {
SetScriptResult(true);
}
}
Does not return 'true' when I check ObjEnemyBossScene_GetInfo(bossObj,INFO_IS_DURABLE_SPELL) with text object. Am I missing something?

Try setting the time limit as well.
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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #437 on: March 18, 2015, 06:40:06 AM »
Try setting the time limit as well.
There is one, I removed it in the post for display reasons but guess that wasn't a good idea. (There was also a life result)

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #438 on: March 18, 2015, 07:35:00 AM »
There is one, I removed it in the post for display reasons but guess that wasn't a good idea. (There was also a life result)
What about the spell bonus?
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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #439 on: March 18, 2015, 07:49:56 AM »
What about the spell bonus?
Negative. Funny thing is: If I set a spell bonus score, and try to retrieve that value it doesn't report it either. But if I capture the card, it will show the spell bonus I set with the default system.

Edit
Never mind, figured it out when I realised I had used the INFO_TIMER before in my SpellCircle code: ObjEnemyBossScene_GetInfo(GetEnemyBossSceneObjectID,INFO_TIMER);

The magical missing value here is GetEnemyBossSceneObjectID which will retrieve the bossSceneID and then the function becomes usable. bossObj is wrong because that is the enemy boss obj. Also retrieving the scene id with commondata caused ph3 to freeze.

Now I can see that my debug text throws " true " for the DURABLE_SPELL result.
« Last Edit: March 18, 2015, 08:00:01 AM by Helepolis »

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #440 on: March 18, 2015, 08:28:31 PM »
Negative. Funny thing is: If I set a spell bonus score, and try to retrieve that value it doesn't report it either. But if I capture the card, it will show the spell bonus I set with the default system.

Edit
Never mind, figured it out when I realised I had used the INFO_TIMER before in my SpellCircle code: ObjEnemyBossScene_GetInfo(GetEnemyBossSceneObjectID,INFO_TIMER);

The magical missing value here is GetEnemyBossSceneObjectID which will retrieve the bossSceneID and then the function becomes usable. bossObj is wrong because that is the enemy boss obj. Also retrieving the scene id with commondata caused ph3 to freeze.

Now I can see that my debug text throws " true " for the DURABLE_SPELL result.

Debugging is often a pain in Danmakufu, eh?
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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #441 on: March 19, 2015, 10:06:50 AM »
Yeah, I need some help with Danmakufu and AppLocale.
So, what will happen if I open Danmakufu without Applocale?
Also how do I install AppLocale? Willl it change my computer system and... <Insert More questions here>?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #442 on: March 19, 2015, 03:06:06 PM »
Yeah, I need some help with Danmakufu and AppLocale.
So, what will happen if I open Danmakufu without Applocale?
Also how do I install AppLocale? Willl it change my computer system and... <Insert More questions here>?

Please read the sticky: https://www.shrinemaiden.org/forum/index.php/topic,6181.0.html
AppLocale info thread: https://www.shrinemaiden.org/forum/index.php?topic=4138.0

Regarding your questions:
If you open ph3 [.1] without AppLocale, it will run 100% fine. If you run ph3 [.0] without it, none of the scripts will load. 0.12m will crash
It's software, so no, it will not change your operating system.

Please read the FAQ and some of the tutorials - at this point it should be clear that you do not need AppLocale to run ph3

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #443 on: March 19, 2015, 03:12:14 PM »
0.12m will crash
It don't crash if you have no japanese caracters in your scripts (at least it never crash with my scripts and without applocal).

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #444 on: March 19, 2015, 09:04:24 PM »
Danmakufu 12m doesn't work with Windows Aero(fancy window style introduced in Vista and 7), it doesn't need Applocale unless you try to play a script with Japanese characters.

Danmakufu Ph3 used to require applocale to run properly (mainly to see error messages) but since the support for Unicode in version 0.1 pre1, it is no longer needed. The engine will adjust itself depending on your computer's locale.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #445 on: March 20, 2015, 02:45:21 PM »
So I am trying to load a 2D map from a text file. However, I do not how to load this into a 2D array in Danmakufu, as there do not seem to be ObjFile functions that can read individual characters from a text file.

Would it be best to write a C program to convert my text file to a binary one and then use ObjFileB_ReadByte() to obtain the character values in the map so that I can process and load them into a 2D array? Or is there a O(n^2) or better alternative solution?

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #446 on: March 20, 2015, 03:08:11 PM »
What's the current format of the map? Depending on what you're trying to get from the map a solution would vary.

EDIT: Yup.
« Last Edit: March 20, 2015, 06:38:56 PM by Drake »

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 thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #447 on: March 20, 2015, 03:28:48 PM »
What's the current format of the map? Depending on what you're trying to get from the map a solution would vary.

It's a 36x36 grid of characters, each of which corresponds to a specific type of object. Excerpt below:
Code: [Select]
....................................
....................................
....................................
....00000.............#.............
....00000.............#.............
....00000...........#####...........
....00$00...........#...#...........
......*.............#...#*..........
......#.............#....$000.......
......#.............#....0000.......
......#.............#....0000.......
......#.............#...............
......#########...00000.............
......#.......#...00000.............
......#.......###*$0000.............

For example, the first . in the code would prompt me to ObjTile_Create(0,0) and then ObjTile_SetState(obj, OBJTILE_TYPE_WALL). However, I would need the character at (0,0) in order to determine which state to set it to, and there is no ObjFileT function for that.

Note: ObjTile is a custom object I created in Danmakufu that extends ObjRender



EDIT: GTbot found the super simple face palm-worthy solution

[3/20/15, 12:02:53 PM] Harley (gtbot): string = objfile_getline
[3/20/15, 12:03:08 PM] Harley (gtbot): string[0] = first character
string[1] = second character
[3/20/15, 12:03:08 PM] Harley (gtbot): etc

Thanks though, Drake.
« Last Edit: March 20, 2015, 06:26:03 PM by Sparen »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #448 on: March 20, 2015, 06:41:21 PM »
Related to earlier post about the limit of characters in the Logwindow, I've addressed this at Mkm's BBS, let us see what he has to say about this issue. Would be supreme if it would be fixed somehow (if it is an error or limitation), otherwise I am forced to spam more commondatas.

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #449 on: March 20, 2015, 07:42:37 PM »
So I am trying to load a 2D map from a text file. However, I do not how to load this into a 2D array in Danmakufu, as there do not seem to be ObjFile functions that can read individual characters from a text file.

Would it be best to write a C program to convert my text file to a binary one and then use ObjFileB_ReadByte() to obtain the character values in the map so that I can process and load them into a 2D array? Or is there a O(n^2) or better alternative solution?

An O(n^2) or better solution is impossible due to how arrays are handled in Danmakufu.
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