Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 206531 times)

Re: Danmakufu Q&A/Problem thread number 4
« Reply #510 on: November 12, 2010, 08:38:41 PM »
Afternoon folks. Just got DMF today and I'm having some crashing troubles - specifically, if I make it to the end of a spell in Single mode. So far I've only tried the included EX-Rumia spells, and I personally can't beat the Plural-mode.

In addition, when going down the list of spells in Single mode it doesn't show the preview screenshots. I tried it without AppLocale and they show fine (but it crashes if I try to play it). I feel like I'm missing something obvious here, but I don't know what.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #511 on: November 12, 2010, 10:56:27 PM »
I'm having a problem with applocale, I've followed the instructions on running danmakufu and such, and it worked the 1st time. However, when I try to run it again, it doesn't work and my computer tells me there is an error and danamakufu needs to close down. I'm using the 4th language from the bottom. Also, I'm using the 'launch an application' option. Help?

Schezo

  • en-counse
Re: Danmakufu Q&A/Problem thread number 4
« Reply #512 on: November 13, 2010, 02:13:51 AM »
Octopus: you should be using the language at the very bottom.

Sejha

  • I think Im a game dev. And Musician.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #513 on: November 13, 2010, 02:41:05 AM »
Afternoon folks. Just got DMF today and I'm having some crashing troubles - specifically, if I make it to the end of a spell in Single mode. So far I've only tried the included EX-Rumia spells, and I personally can't beat the Plural-mode.

In addition, when going down the list of spells in Single mode it doesn't show the preview screenshots. I tried it without AppLocale and they show fine (but it crashes if I try to play it). I feel like I'm missing something obvious here, but I don't know what.
Some copies of DNH are quite frankly broken beyond belief.

My copy for example is only able to use the directory command without crashing.
I've evolved a lot. When did I make this account again?

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #514 on: November 13, 2010, 02:44:56 AM »
Let's get this straight

Code: [Select]
let array=[0, 0, 0];
array[2]=180-array[2];
bad allocation
Code: [Select]
let array[0, 0, 0];
let tempval=array[2];
tempval=180-tempval;
array[2]=tempval;
works


wut, why?
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #515 on: November 13, 2010, 03:11:07 AM »

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

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #516 on: November 13, 2010, 03:50:56 AM »
dammit... malloc :|
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #517 on: November 13, 2010, 05:55:09 AM »
Malloc is a good thing. Odd coding is not.

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

Furienify

  • Yeehaw!
  • Equestrian Fansubber
    • Youtube Channel
Re: Danmakufu Q&A/Problem thread number 4
« Reply #518 on: November 15, 2010, 09:44:24 AM »
Some copies of DNH are quite frankly broken beyond belief.

My copy for example is only able to use the directory command without crashing.

Delete script_index.dat, restart Danmakufu and try again. Usually fixes the problem.

If it doesn't, one of your scripts is has its opening parameters (#TouhouDanamakufu etc) bracketed wrong.

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #519 on: November 16, 2010, 12:53:31 AM »
Since I really don't like the built-in Enemymarker of Danmakufu I decided to make my own Effect Object for it.
Some of my goals are:
-Better graphic than the bad loking built-in one (done)
-Making it look smooth and bright(graphics: yes / coding:...no... :derp:)
-Making it move on the same X-Position as the boss(done)
-Making it useable with ALL kinds of enemies and not only bosses( I didn't try that, but it should work...)
-Making it glow brighter when you move away from the boss and making it more transparent when you move towards it (there is one of my problems)
-Making it flash rapidly when the lifebar of the boss is nearly empty(I got another problem here)

Well, you already notice, it shall look like the one ZUN made for his games, just with my own graphics, because it makes it more unique  :V
Anyway, my problems a little better explained:

First:
How can I get the opacity stuff in my script. To be a little more precise: I want a smoothly decreasing opacity when your X-Position gets nearer to the one of the boss.
I could do it with a counter that counts the difference and sets new values in Obj_SetAlpha every now and then, but that wouldn't be very smooth, except if I make bazillions of if-statements and you know, I'm too lazy for that and I'm pretty sure there are more ways and I just don't have the imagination  :V

Now the flashing stuff:
The easiest , most efficient, but not best  looking way I can think of  is to create two parameters for my function.
One for the 1. life-value where it starts to flash slowly and the second one for the life-value where it starts to flash twice as fast.
This method is, like it said earlier, not sooo smooth and you know it is one of my goals to make it look good, eventhough some people might say that this is not necessary.

If you want to take a look at the script, feel free to do so:
http://pastebin.com/M83sz7F4

Thanks for taking yur time :3

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #520 on: November 16, 2010, 01:11:28 AM »
First problem (more opaque when you're closer to the boss), here's one way to handle it. X is the position of the marker, while k and alpha should be declared beforehand.

Code: [Select]
alpha=absolute(x-GetPlayerX)*2+100;  //the 2 sets how far you have to be away for it to be maximum opacity (opacity units per 1 pixel of difference), and the 100 sets the minimum opacity
if(alpha>255){alpha=255;}

k=0;
loop(4){
ObjEffect_SetColor(obj,k,alpha,255,255,255);
k++;
}

For the flashing code, you can use (maxlife-GetEnemyLife)/maxlife to get the percentage of life the boss has left, as long as you set maxlife to be the maximum life value of the enemy (obviously). You can then use that value as a multiplier for how fast it's flashing (possibly using a sine wave). If anyone else wants to elaborate on this, go ahead. (I'm a bit pressed for time at the moment, and I figured the theory should be enough to get you started.)

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #521 on: November 16, 2010, 01:22:06 AM »
Code: [Select]
k=0;
loop(4){
ObjEffect_SetColor(obj,k,alpha,255,255,255);
k++;
}
Thanks!
Looks like something I can figure out...
But I think you mean this function, don't you?
Code: [Select]
ObjEffect_SetVertexColor(obj,k,alpha,255,255,255);
As far as I know yours doesn't exist, does it?

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #522 on: November 16, 2010, 01:32:54 AM »
as long as it's defined it's good lolol

function EffectSetAlpha(n,a){    ascent(i in 0..n){    ObjEffect_SetVertexColor(obj,i,a,255,255,255);    }    }

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

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #523 on: November 16, 2010, 01:36:41 AM »
as long as it's defined it's good lolol

function EffectSetAlpha(n,a){    ascent(i in 0..n){    ObjEffect_SetVertexColor(obj,i,a,255,255,255);    }    }
Well...yeah  :V

Anyway, I used Azure's version with my little fix and I set the minimum opacity to 50 and it works great =D
Thanks a lot!

€dit:
Ok, changed the minimum again to 80 and the range to reach the minimum to 1. Looks pretty smooth now and I'm very happy with it.
« Last Edit: November 16, 2010, 09:11:04 PM by Grumskiz »

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #524 on: November 16, 2010, 04:15:24 AM »
Yeah, sorry for the typo there. I use a custom function like what Drake posted instead of looping through them, and like I said, I was in a bit of a hurry. As long as you understood it, it's fine though, right?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #525 on: November 17, 2010, 06:13:48 AM »
Octopus: you should be using the language at the very bottom.

I tried the four bottom languages, and none of them worked. Maybe I'm using Applocale incorrectly?!

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #526 on: November 17, 2010, 11:09:03 AM »
Did you install all languages from your Windows CD?
Can you actually see japanese letters at the alst language or only 3 squares?

Sejha

  • I think Im a game dev. And Musician.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #527 on: November 17, 2010, 03:27:52 PM »
Wow... I sure got questions.

Y'know the very loud sound that plays on enemy death? How do I change it?
I've evolved a lot. When did I make this account again?

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #528 on: November 17, 2010, 03:32:03 PM »
dnhfolderseseEnemyExplode01.wav

and 02

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

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #529 on: November 17, 2010, 08:23:02 PM »
Drake's method is easier and safer, but you could also disassemble your th_dnh.dat and replace the sounds in it.

Paper Conan

  • Productivity, all day 'erry day
  • NOPE, just kidding~
Re: Danmakufu Q&A/Problem thread number 4
« Reply #530 on: November 17, 2010, 11:29:51 PM »
Um, I have a simple question... How do you install the unofficial CtC spellcard practice on danmakufu?  :blush:
\edit:
nvm, I got it to work. lol
« Last Edit: November 17, 2010, 11:42:00 PM by Paper_Conan »

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #531 on: November 18, 2010, 01:09:22 AM »
Or just stick DeleteSE("se\seEnemyExplode01.wav"); into @Initialize and it's gone for the entirety of the script! No need to mess around with switching files or disassembling a dat. I forgot who discovered this, but it wasn't me.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #532 on: November 18, 2010, 02:51:06 AM »
Uh what? Sound files are loaded when they play as well, so wouldn't they just reload again? I just stick DeleteSE("se\seEnemyExplode01.wav"); in @Finalize of every enemy I use.

Oh hey, look at that. Deleting any of the default sound effects makes them unplayable unless you reload them or restart dnh. Interesting.
« Last Edit: November 18, 2010, 02:59:19 AM by Naut »

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #533 on: November 18, 2010, 03:07:45 AM »
In that case couldn't you just edit that into stage0 instead of in the script?

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

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #534 on: November 18, 2010, 03:42:15 AM »
In that case couldn't you just edit that into stage0 instead of in the script?
Gave it a try. The exact code doesn't seem to work, but I try out some other things...
Actually this requires to disassemble your th_dnh.dat again, so actually that step is only useful for lazy people with weird ideas.(like me)

Little report:
DeleteSE("se\seEnemyExplode01.wav");  --doesn't change anything
DeleteSE(".\seEnemyExplode01.wav"); --crashes Danmakufu when you try to load a script
DeleteSE("GetCurrentScriptDirectory ~ \seEnemyExplode01.wav"); --doesn't change anything

Has anyone more ideas, what to try? Or has anyone any experience with script0.txt?


€dit:
dnhfolder\se\seEnemyExplode01.wav

and 02

As far as I know there is no seEnemyExplode02.wav oO
At least I couldn't find it in my th_dnh.dat, but maybe that's just me at 23:57 -.-
Must.go.to.bed.and...sleeeeeep
« Last Edit: November 18, 2010, 03:59:07 AM by Grumskiz »

Re: Danmakufu Q&A/Problem thread number 4
« Reply #535 on: November 18, 2010, 06:41:12 AM »
Did you install all languages from your Windows CD?
Can you actually see japanese letters at the alst language or only 3 squares?

I can see the kanji on the last one, and the characters on the last three. (That's on my mother's laptop, but on my normal computer I can't. Does it matter, if so don't worry I'll work it out. Hopefully.)

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #536 on: November 18, 2010, 11:07:50 AM »
I can see the kanji on the last one, and the characters on the last three. (That's on my mother's laptop, but on my normal computer I can't. Does it matter, if so don't worry I'll work it out. Hopefully.)
Yeah, you need to install all eastern asian language files from your Windows CD first, before you can use Applocal correctly.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #537 on: November 19, 2010, 05:10:38 PM »
Sorry to shift the course of the current discussion, but is there a way to make a user defined player spellcard NOT nullify bullets and stuff and suck them into it like point items? I was hoping that skipping the CollectItems(); that Stuffman placed in the MainLoop of his tutorial would do the trick, but I was wrong. Is there any way at all to disable this annoying behaviour?
« Last Edit: November 19, 2010, 05:15:43 PM by MasterSpark »

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #538 on: November 19, 2010, 05:58:07 PM »
Sorry to shift the course of the current discussion, but is there a way to make a user defined player spellcard NOT nullify bullets and stuff and suck them into it like point items? I was hoping that skipping the CollectItems(); that Stuffman placed in the MainLoop of his tutorial would do the trick, but I was wrong. Is there any way at all to disable this annoying behaviour?
Don't use the ObjSpell_SetIntersecrionCircle and ObjSpell_SetIntersecrionLine commands on the spell objects..?
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #539 on: November 19, 2010, 06:09:19 PM »
Don't use the ObjSpell_SetIntersecrionCircle and ObjSpell_SetIntersecrionLine commands on the spell objects..?

I'm not actually using any Spell Objects in my bombs though. I'm trying a new approach to bombing where a push on the 'X' button will release a different kind of regular attack, one that won't make you go invincible or help you out of a tight spot without careful use. So far I've only tried doing it with regular Object Shots. Should I remake it with Spell Objects instead? Can the projectiles still cause damage to the enemy even if the intersecrion commands are missing?

Edit: I also tried skipping the whole @SpellCard deal in the player script and include if-statements in the MainLoop that checks if the bomb button is being pushed or held down, but that seems to strain the processing in some weird ways, resulting in a drop of framerate.
« Last Edit: November 19, 2010, 06:11:51 PM by MasterSpark »