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

Alicirno

  • Seer of Heart
  • Paruparuparu
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #540 on: January 01, 2013, 08:40:50 PM »
(Double post or no notification!!!1!! Sorry :c)
Apparently with the latest version of Dnh you don't need applocal but it won't detect some scripts. Could there be any bugs with this? It doesn't detect the Japanese scripts but it detects the English ones. Still going to use applocal though.
I haven't had any problems with running it without applocale, other than not detecting Japanese scripts.

Hey guys, I'm pretty new with Danmakufu and I have absolutely 0% experience with programming whatsoever.

I have a question: Are the codes used in the tutorials work for ph3 as well?  ???

Thanks in advance. :3

The tutorials are based on 0.12m, so no (though they are similar).  And there aren't any tutorials yet, so you have to use the wiki to create ph3 scripts.

http://dmf.shrinemaiden.org/wiki/How_to_Write_Scripts - Use this for script structures.
http://dmf.shrinemaiden.org/wiki/Functions_%28ph3%29 - Use this for functions.

Gensokyo Dreadnought

  • Fantastic Dreadnought o' War
  • Ran said no more capitalism...
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #541 on: January 01, 2013, 08:48:01 PM »
The tutorials are based on 0.12m, so no (though they are similar).  And there aren't any tutorials yet, so you have to use the wiki to create ph3 scripts.

http://dmf.shrinemaiden.org/wiki/How_to_Write_Scripts - Use this for script structures.
http://dmf.shrinemaiden.org/wiki/Functions_%28ph3%29 - Use this for functions.

Very much appreciated~! Thanks! :3

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #542 on: January 02, 2013, 06:34:47 AM »
To clarify, while the functions for ph3 can be different, the methodologies for anything you do from the 0.12 tutorials is going to be essentially the same in ph3; at least to start out with. For the most part, you just have to know which function in ph3 corresponds to the similar function in 0.12, if the function is even named differently at all. It will probably be a bit confusing to deal with, still.

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #543 on: January 14, 2013, 08:42:25 PM »
Why can't 2d primitive, 2d sprite, 2d sprite list, 3d primitive or 3d sprites be used by functions like ObjMove_SetMovePosition01(); and ObjMove_SetPosition(); ?

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #544 on: January 15, 2013, 12:44:00 AM »
There isn't a function called SetMovePosition, so I assume you mean AddPattern or DestAtFrame or something. Anyways, it's simply because they aren't Move objects. The functions are just undefined if they aren't Move objects, just as you can't use ObjShot_SetDamage on a Text object.
http://www.geocities.co.jp/SiliconValley-Oakland/9951/products/th_dnh_help_v3_data/other_spec.html#Object

You can still use ObjRender_SetPosition though.

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #545 on: January 15, 2013, 01:52:38 PM »
Ugh. Does that mean with every 2d sprite I have to be an enemy object? But that wont cause problems for things that get the enemy count or misdirect aimed player shots, right? Either that or I will have to make render move functions/tasks that functions like ObjMove_SetDestAtSpeed(); and all that...

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #546 on: January 15, 2013, 07:06:01 PM »
What are you even trying to do? I'm not seeing the problem here.

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #547 on: January 16, 2013, 03:46:40 PM »
Basically, I wanted to be able to make render objects be usable with move functions like ObjMove_SetDestAtFrame(); . But since I can't I will either have to make functions that function the same way as ones like  ObjMove_SetDestAtFrame(); , but will be able to move render objects instead, or I make render objects an enemy object but that could cause problems like getting the enemy count on the screen.
If I don't do either then I will have to move the render objects around by scripting a block of code or so.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #548 on: January 16, 2013, 07:10:36 PM »
I meant more of the context of what you're doing; I got that you wanted to use DestAtFrame. It's easy enough to write a function that works the same way, but the question is why you need to in the first place, because using movement-trajectory functions to move around sprites that aren't enemies or items seems weird.

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #549 on: February 02, 2013, 09:27:30 PM »
How do you make 3D backgrounds?

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #550 on: February 06, 2013, 02:46:13 AM »
How do you make 3D backgrounds?
Depends on whether you want actual, modeled backgrounds, or just flat textures.

For the former, you need to get familiar with Metasequoia. I don't know of any programs that can convert to the mqo file format, which is a shame, as I much prefer using Milkshape. Use ObjPrim_Create(OBJ_SPRITE_3D) for the latter.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #551 on: February 06, 2013, 04:18:32 PM »
Depends on whether you want actual, modeled backgrounds, or just flat textures.

For the former, you need to get familiar with Metasequoia. I don't know of any programs that can convert to the mqo file format, which is a shame, as I much prefer using Milkshape. Use ObjPrim_Create(OBJ_SPRITE_3D) for the latter.
I do the latter but it just gives me a white background. I have all the 3D functions included.

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #552 on: February 06, 2013, 05:05:56 PM »
I do the latter but it just gives me a white background. I have all the 3D functions included.
More than likely, the path to your image is wrong.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #553 on: February 07, 2013, 04:41:05 PM »
More than likely, the path to your image is wrong.
Nope, path is correct

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #554 on: February 07, 2013, 05:41:22 PM »
Nope, path is correct
I can only otherwise guess it's the fog, but beyond that I'm unsure without seeing the code.
« Last Edit: February 07, 2013, 10:30:26 PM by gtbot »

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #555 on: February 07, 2013, 06:33:42 PM »
I can only otherwise guess it's the fog, but beyond that I'm unsure without the code. It it
Fog?
* fonduemaster checks the Danamkufu wiki.

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #556 on: February 11, 2013, 12:42:06 PM »
Fog?
* fonduemaster checks the Danamkufu wiki.
Post your code, along with the image you're using.

Fog is disabled by default, so that absolutely cannot be it.

Maths ~Angelic Version~

  • Aspiring Mathematician of Brilliant Laziness
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #557 on: February 15, 2013, 01:06:52 PM »
I tried to make a multiple boss battle, but it looks like Danmakufu can only handle one ObjEnemy_Create(OBJ_ENEMY_BOSS) at a time.
Do I have to define one of the bosses as an ObjEnemy_Create(OBJ_ENEMY) (ordinary enemy) or is there a way to avoid it? Does it matter anyway that one of the "bosses" isn't defined as a boss?
Thanks in advance.
~Maths

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #558 on: February 15, 2013, 03:40:06 PM »
I tried to make a multiple boss battle, but it looks like Danmakufu can only handle one ObjEnemy_Create(OBJ_ENEMY_BOSS) at a time.
Do I have to define one of the bosses as an ObjEnemy_Create(OBJ_ENEMY) (ordinary enemy) or is there a way to avoid it? Does it matter anyway that one of the "bosses" isn't defined as a boss?
Thanks in advance.
~Maths
Yeah, you'll have to define as a regular enemy. It doesn't matter that one of the bosses aren't defined as a boss, as you could just manipulate whatever you need to get the desired effect.

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #559 on: February 15, 2013, 04:31:21 PM »
Yeah, you'll have to define as a regular enemy. It doesn't matter that one of the bosses aren't defined as a boss, as you could just manipulate whatever you need to get the desired effect.
Isn't the fact that Danmakufu can't handle more than 1 boss strange? I mean, if there can only ever be one boss then why does GetEnemyBossObjectID return an array instead of a single ID?

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #560 on: February 15, 2013, 07:05:46 PM »
Isn't the fact that Danmakufu can't handle more than 1 boss strange? I mean, if there can only ever be one boss then why does GetEnemyBossObjectID return an array instead of a single ID?
I questioned that too, maybe its forward compatibility for a future update? (so that if they add more than just 1 boss, it won't break scripts by changing the data type from integer to array)

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #561 on: February 15, 2013, 07:44:13 PM »
Post your code, along with the image you're using.

Fog is disabled by default, so that absolutely cannot be it.
Ahhhh, found out that you have to set the fog beforehand. Thanks anyway.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #562 on: February 19, 2013, 09:55:23 PM »
Is it possible to alter the course of a bullet (AddPattren) if it has been created from a function (ex.: nWayToPlayer) on a #include script (ex.: customFunctions.txt)? If so then how?

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #563 on: February 19, 2013, 11:06:21 PM »
Is it possible to alter the course of a bullet (AddPattren) if it has been created from a function (ex.: nWayToPlayer) on a #include script (ex.: customFunctions.txt)? If so then how?

Yes it's possible. Just return the bullet ID at the end of the function with the return function. (ex.: return objShot;)

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #564 on: February 23, 2013, 03:07:51 PM »
I'm interested in creating my own TD/GFW style boss lifebar. Where do I start and what do I do? I've peeked inside the default lifebar but I don't understand any of it. And I want to make a custom one because I don't want my scripts to look too ZUN-like.

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #565 on: February 23, 2013, 04:04:20 PM »
I'm interested in creating my own TD/GFW style boss lifebar. Where do I start and what do I do? I've peeked inside the default lifebar but I don't understand any of it. And I want to make a custom one because I don't want my scripts to look too ZUN-like.
You can take and use/modify mine if you'd like (located in /ds_system/S_System.h and inside the BossLife task, but if you want to make yours from scratch, making a circular lifebar is taking the flat lifebar information, tossing the actual flatbar graphic, and then making a primitive object which draws the points angularly.

I'm sure there may be multiple (and better ways) of doing this, but the way I did it was creating two separate primitive objects, one with the lifebar outline and of the actual life itself. They were made with ascents that added the vertices in a circular ribbon-like fashion (an example of this would be the default magic circle). After this, I multiplied the remaining lifebar (which is returned from danmakufu in a 1-0 value) by 360, and then with each primitive point on the lifebar, I did a min(point's original location in a 0-360 value, the remaining life multiplied by 360); which gives the lifebar effect.  The amount of vertices you use depends up to you, as more vertices gives more health precision and a smoother circle, but also has more lag. Another thing to consider would be removing vertices instead of doing a min() check.

After that, the stars, which represent the amount of steps remaining in the plural, are next, and are probably the easiest. Use a sprite list to display the amount of steps left (INFO_REMAIN_STEP_COUNT), and if you use the same variables from the previous flat lifebar, it should take care of the lifebar regain effect which is done after completing a step. The nubs that represent each attack within a step is also similarly easy. Danmakufu returns an array with all the attacks inside a step (INFO_ACTIVE_STEP_LIFE_RATE_LIST) in a very convenient 1-0 percentage value; by using this array you can do an ascent loop and create each nub on an angle within the lifebar by multiplying the proportion of each step with 360. (Also this information is not necessarily required to be presented the way I described, as this would make it ZUN-like, but this information is needed to display to the player so they won't be left confused)

Also, all of these values are obtained from ObjEnemyBossScene_GetInfo, and I suggest getting used to the default life bar and how it works or it's going to be quite difficult trying to do the circular one. Plus, knowing how the regular life bar works would make things a lot easier for you when doing the circular one.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #566 on: March 01, 2013, 06:32:12 PM »
If I wanted to make a bullet rotate around an object, no matter where the said object should be/move to, how would I go about this? Would I have to use Lasers, or could I use Bullets?

And how would I be able to separate them afterward, simply make them fly outward, away from the object?
« Last Edit: March 01, 2013, 07:07:08 PM by TheScriptwriter »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #567 on: March 02, 2013, 04:13:30 AM »
http://www.shrinemaiden.org/forum/index.php/topic,865.0.html

Covers what would be needed. Particularly the trigonometry part and the Great Whirlwind example. The orbiting bullet you could create in a task, and each frame you would increase an angle variable, and set the position of the bullet to be a certain radius around whatever other object you want.

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

8lue Wizard

  • Cobalt Magician
  • (Apparently)
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #568 on: March 08, 2013, 10:21:10 AM »
So I've been out of the loop for a while, but I remember back when I was making my Nazrin player script for 0.12, someone had made up test scripts to measure DPS and bomb damage. Does something like that exist for ph3?

Also, I've noticed that most of the ph3 player scripts up on BulletForge have a bunch of CommonData junk at the top. What's the deal with that? If I ignore it, will my script have compatability issues?

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #569 on: March 08, 2013, 01:24:04 PM »
So I've been out of the loop for a while, but I remember back when I was making my Nazrin player script for 0.12, someone had made up test scripts to measure DPS and bomb damage. Does something like that exist for ph3?

Also, I've noticed that most of the ph3 player scripts up on BulletForge have a bunch of CommonData junk at the top. What's the deal with that? If I ignore it, will my script have compatability issues?
Luckily, I remembered that I had my old working dps tester (pastebin link) on my mediafire (i broke the one on my computer by accident oops). Should work as long as you didn't alter or change the default_system folder.

The second question, that depends on the player itself, but I'm a culprit of common data in my players. Non of my players will have compatibility issues if you ignore the commondata.