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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
※ Dnh Q&A/Problem ※ for Danmakufu ph3 (locked)
« on: July 11, 2011, 03:48:45 PM »
This is the Q&A thread for the newest Danmakufu engine, currently ph3 beta.

The wiki for 0.12m has been moved to different page here: http://dmf.shrinemaiden.org/wiki/index.php?title=Danmakufu_v0.12m

The wiki itself will from now on update for ph3 beta: http://dmf.shrinemaiden.org/wiki/index.php?title=Main_Page


Before you ask questions about "can I port my scripts from 0.12m to ph3?" Answer is No. You can't.
« Last Edit: March 13, 2014, 09:55:16 PM by Helepolis »

TheMasterSpark

  • Lunatic lemurialist
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #1 on: July 13, 2011, 05:48:21 PM »
There doesn't seem to be any built-in function for using Cut-ins in enemy scripts. Am I right in that we need to handle them ourselves like image objects, or is it still in there, hidden somewhere?

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #2 on: July 13, 2011, 06:20:33 PM »
The sample has the lines for Concentration01 and CutIn commented out, so I think it's safe to say they aren't implemented in the current version, but may be added later. For now, you'll have to make a custom CutIn object.

TheMasterSpark

  • Lunatic lemurialist
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #3 on: July 13, 2011, 06:39:26 PM »
Ah, you're right. I knew I had seen those familiar words somewhere when mulling over the scripts earlier, but I guess my mind automatically filtered it away due to the double slashes. Thanks.  :)

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #4 on: July 15, 2011, 08:40:58 AM »
Could somebody help?

My Danmakufu ph3 doesn't see any script, although it's correctly written. Have somebody the same problem?

TheMasterSpark

  • Lunatic lemurialist
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #5 on: July 15, 2011, 09:10:52 AM »
Yeah, I had that as well at first. I needed to run it through Applocale in order for it to show scripts. Running it without Applocale didn't crash the game like it did with the earlier version of Danmakufu, but with this new one I couldn't see anything other than folders.

J.O.B

  • YOU CAN'T MAKE ME CHANGE
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #6 on: July 15, 2011, 09:24:27 AM »
Would it actually be possible to make it able to run without japanese characters? As in change all the japanese characters to something english?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #7 on: July 15, 2011, 10:39:33 AM »
What Masterspark said, you NEED APPLOCAL in order to see the example scripts.

Would it actually be possible to make it able to run without japanese characters? As in change all the japanese characters to something english?
Any script not containing Japanese characters will be recognized without AppLocal. So yes, if you eliminate all JP text inside the example scripts, they will all showup.

This is what you need at the top of any script (like in old dnh, except this time the type of script is located inside the headers and not through enemy_script_xxxx anymore.

Code: [Select]
#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["lolTitle"]
#Text["lolText"]


Stuffman

  • *
  • We're having a ball!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #8 on: July 15, 2011, 11:00:19 PM »
There doesn't seem to be any built-in function for using Cut-ins in enemy scripts. Am I right in that we need to handle them ourselves like image objects, or is it still in there, hidden somewhere?

I suspect the Boss Scene Objects are used for this, but I have no idea how they work yet.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #9 on: July 16, 2011, 12:00:13 AM »
I suspect the Boss Scene Objects are used for this, but I have no idea how they work yet.

It is used for plural boss fights actually.

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #10 on: July 16, 2011, 02:41:22 AM »
Yeah, no built in spell card name code or cutin code. You can use this in the meantime.

Code: [Select]
//Draws the spell card name as an text object.
task SetSpellText01(string)
{
loop(60){yield;}

let txt = ObjText_Create;
ObjText_SetText(txt,string);
ObjText_SetFontSize(txt,12);
ObjText_SetFontColorTop(txt,255,255,255);
ObjText_SetFontColorBottom(txt,128,128,255);

ObjText_SetFontBorderType(txt,BORDER_FULL);
ObjText_SetFontBorderColor(txt,0,0,64);
ObjText_SetFontBorderWidth(txt,1);

ObjText_SetHorizontalAlignment(txt, ALIGNMENT_RIGHT);
ObjText_SetMaxWidth(txt, 300);
ObjRender_SetX(txt, 368 - 300);

ascent(i in 0..60)
{
ObjRender_SetAlpha(txt,i*255/60);
ObjRender_SetY(txt,80-i);
yield;
}


while(!Obj_IsDeleted(objEnemy)){yield;}
Obj_Delete(txt);
}

Nimono

  • wat
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #11 on: July 17, 2011, 11:52:57 PM »
Does anyone know if ph3 has a new shot data function to spin shots? Previously, we used angular_velocity, but it seems that's no longer a valid option. I'd look on the wiki, but there's nothing there about shot data at all... Also, I checked the Default_ShotData file and found THEY use angular_velocity, but when I put it on my player shots, they don't spin at all...

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #12 on: July 18, 2011, 12:16:06 AM »
angular_velocity does not work at all for the moment - ph3 is still in beta, so it's possible they took it out temporarily to make things work.

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #13 on: July 18, 2011, 01:13:04 AM »
Can anyone figure out how to get ObjText_SetFontType to work? It crashes Danmakufu without fail, even when the corresponding InstallFont runs successfully (returns true).

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #14 on: July 18, 2011, 09:43:04 AM »
Can anyone tell is there a function to find square root?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #15 on: July 18, 2011, 08:24:34 PM »
Can anyone tell is there a function to find square root?

Square root is also known as taking the half power. Therefore blah^0.5 is the square root of blah.
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #16 on: July 19, 2011, 11:07:01 AM »
Square root is also known as taking the half power. Therefore blah^0.5 is the square root of blah.
Thanks.

And is there a function to check if two specified objects are colliding? ObjCol_IsIntersected doesn't seem useful for this.

Something XutaWoo-y

  • Adorable Weaponsmith
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #17 on: July 22, 2011, 08:44:35 AM »
A question more on design than actual programming, but for players with power level, should debug keys that increase and decrease power level be kept? Since I doubt it'll be common for single boss scripts to drop power items, this'll keep players from being stuck at base power level for the entirety of the fight.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #18 on: July 22, 2011, 09:32:58 PM »
Just default it to a fairly neutral power level, use a DPS script to balance it.

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

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #19 on: July 23, 2011, 12:17:34 AM »
Whoops, misunderstood question.

Since we're used to 0.12m, most people will probably ignore power items so you should probably have it default to a specific power level at all times. However, if you want, you can make your player read a common data to turn on power levels and tell people to use that if they want power items to be compatible with your player.

In fact, why don't we establish a certain common data that anyone can use to turn on compatibility with power items? Any name suggestions?
« Last Edit: July 23, 2011, 12:26:15 AM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

J.O.B

  • YOU CAN'T MAKE ME CHANGE
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #20 on: July 23, 2011, 01:25:44 AM »
I trying to make a pattern where bullets are shot in a circle and then after 1 second, spin around however many degrees and eventually get to me. But I'm having trouble making the angle increase properly so it isn't working properly. So how exactly do I increase the angle? I've tried using angle++ but it doesn't seem to do the trick.

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #21 on: July 23, 2011, 01:31:36 AM »
I'm assuming you're having trouble with making the bullets turn? The problem is that angle++ just adds to a variable named angle, which won't have any connection to the bullet angle unless you code it that way. What you need to do is use a function that changes the angular velocity of a shot, such as ObjMove_AddPatternA2, or change the angle manually each frame using ObjMove_SetAngle. (Link a pastebin next time, it's easier to figure out what the issue is that way)

J.O.B

  • YOU CAN'T MAKE ME CHANGE
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #22 on: July 23, 2011, 01:36:02 AM »
Does it work when I have one of the arguments with the angle variable? Since that's currently what I have.
Also I think I've tried ObjMove_AddPatternA2 before.
And the problem is the bullets turn at the same angle. I want to change that.

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #23 on: July 23, 2011, 03:00:55 AM »
Does it work when I have one of the arguments with the angle variable? Since that's currently what I have.
Also I think I've tried ObjMove_AddPatternA2 before.
And the problem is the bullets turn at the same angle. I want to change that.
Seriously, pastebin your code. It's still really unclear to me what you're trying to do.

J.O.B

  • YOU CAN'T MAKE ME CHANGE
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #24 on: July 23, 2011, 03:14:22 AM »
I actually deleted that part of the script because it started crashing when I put something else in the script (as in another pattern).
I just want to know how to make the bullets turn in increasing angles, not in the same angles.

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #25 on: July 23, 2011, 12:53:39 PM »
Oh, then use a variable (such as angle) in AddPattern, just as you said. You can change either the frame of the angle velocity change, or the amount of the angle velocity.

J.O.B

  • YOU CAN'T MAKE ME CHANGE
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #26 on: July 23, 2011, 01:59:23 PM »
I still isn't working how I want it to :( Oh well, at least I'm having fun :3
Try dodging this ( hint there's a safespot on the spawning line).

http://pastebin.com/1htgkEX5    Large code in Pastebin... -Hele

« Last Edit: July 24, 2011, 08:09:36 AM by Helepolis »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #27 on: July 24, 2011, 05:34:15 AM »
Just a couple things:
1) GetAngleToPlayer is listed as a function in the wiki, however I haven't been able to get it to work.  Not that it is a lot of trouble to create your own variable, it just makes me wonder if there are other functions listed that simply don't do anything.  The best I've gotten out of GetAngleToPlayer is to fire bullets at an angle of 0.

2) I've been looking for how to set the Boss Timer, but in scanning the Default_System script, the arguments for the "Case{}" script don't exist.  Which means I'd have to make educated guesses as to how to set it up.  That is, of course, unless I'm not being very intelligent (a definite possibility).

Edit: Should probably ask the question then:  Anyone figure this stuff out?
« Last Edit: July 24, 2011, 05:36:30 AM by AVeryConcernedSheep »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #28 on: July 24, 2011, 08:14:58 AM »
Just a couple things:
1) GetAngleToPlayer is listed as a function in the wiki, however I haven't been able to get it to work.  Not that it is a lot of trouble to create your own variable, it just makes me wonder if there are other functions listed that simply don't do anything.  The best I've gotten out of GetAngleToPlayer is to fire bullets at an angle of 0.

2) I've been looking for how to set the Boss Timer, but in scanning the Default_System script, the arguments for the "Case{}" script don't exist.  Which means I'd have to make educated guesses as to how to set it up.  That is, of course, unless I'm not being very intelligent (a definite possibility).

Edit: Should probably ask the question then:  Anyone figure this stuff out?

1) GetAngleToPlayer is an Obj based function. It is asking for an Obj parameter. Since the enemies/bosses are obj as well, you need to use that. For example for the Rumia script:

Code: [Select]
objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
ObjEnemy_Regist([b]objEnemy[/b]);

Meaning you need  GetAngleToPlayer(objEnemy); Except, just like in the 0.12m, it only angles it proper if it is spawned at the boss 0,0 location. Otherwise you still need atan2.


2)    ObjEnemyBossScene_SetSpellTimer (as listed on the wiki and manual)

Mеа

  • catnapping
  • three dots connect to rectangles
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #29 on: August 12, 2011, 12:26:17 AM »
So I've been tinkering around with the Mesh Objects and stuff, and .mqo files load properly, but I whenever I try to use .elem files, nothing shows up on the screen? (Using ObjMesh_Load)
Also, how do the materials work? The color stays, but the texture dissapears. Also, it appears that everything aside from the color disapears (alpha, specularity, etc. Although in alpha's case, it kind of works if I use ObjRender_SetAlpha, but then it's still wierd.) Assuming that only the color stays, is there any way to attach a texture from Danmakufu? ObjPim_SetTexture doesn't seem to work, and neither does RendertoTextureB1.
Am I doing something wrong, perhaps?
(I make the model in MetaSequoia and import it into Elfreina(freeware version) to animate. MetaSequoia exports as .mqo and Elfreina as .elem)

EDIT:
I think I might know why the .elem files don't work. For some reason, trying to open the .elem files outside of the program doesn't work. If you try and double click it, you get a message saying that loading the file failed. However, you can use Elfreina to import the data of the model in the .elem file into the program. That's just stupid. Someone just please help.
« Last Edit: August 12, 2011, 03:42:03 AM by EdibleGhost »
Naked expression; purple raspberry flavour