Changing ammo count

Questions about the content creation procedure go here, including using Forge, Anvil, or other editors, or operating emulators like Basilisk II.
Post Reply
User avatar
WeirdoYYY
Born on Board
Posts: 69
Joined: Feb 12th '13, 16:59
Location: Mars

I am having some issues with changing the way ammo shows up in the vanilla HUD for my scenario.

For some of my weapons, I want to put in graphics for something instead of the box like the Fusion Gun has. I tried to change this with MML but even when I tell it to pull graphics instead of a box, it still shows up in the game.
"He looked at his hands, but the fire in his eyes made him blink."
User avatar
The Man
Vidmaster
Posts: 1203
Joined: Aug 6th '08, 05:23
Location: Sarasota, FL
Contact:

It might be easier to resolve the issue if you post the MML you're using. Could be a syntax error (I've definitely had those before - probably still have a few). It's sometimes difficult to tell about those in scripting languages where there's no compiler, per se.
“People should not be afraid of their governments. Governments should be afraid of their people.” —V, V for Vendetta (Alan Moore)

“The trouble is that we have a bad habit, encouraged by pedants and sophisticates, of considering happiness as something rather stupid. Only pain is intellectual, only evil interesting. This is the treason of the artist: a refusal to admit the banality of evil and the terrible boredom of pain. If you can’t lick ’em, join ’em. If it hurts, repeat it. But to praise despair is to condemn delight, to embrace violence is to lose hold of everything else. We have almost lost hold; we can no longer describe happy man, nor make any celebration of joy.” —Ursula K. Le Guin, “The Ones Who Walk Away from Omelas”

“If others had not been foolish, we should be so.” —William Blake, The Marriage of Heaven and Hell

“The law cannot protect anyone unless it binds everyone; and it cannot bind anyone unless it protects everyone.” —Frank Wilhoit

Last.fm · Marathon Chronicles · Marathon Eternal 1.2 · Where Monsters Are in Dreams · YouTube Vidmaster’s Challenge
User avatar
WeirdoYYY
Born on Board
Posts: 69
Joined: Feb 12th '13, 16:59
Location: Mars

The Man wrote:It might be easier to resolve the issue if you post the MML you're using. Could be a syntax error (I've definitely had those before - probably still have a few). It's sometimes difficult to tell about those in scripting languages where there's no compiler, per se.
<interface>

<!-- TR -->
<weapon index="2" shape="39" left="440" top="370">
<ammo index="0" type="2" left="390" top="370" across="100" delta_x="4" delta_y="10" bullet_shape="57" empty_shape"58" right_to_left="1" />
<ammo index="1" type="2" left="390" top="370" across="100" delta_x="4" delta_y="10" bullet_shape="57" empty_shape"58" right_to_left="1" />
</weapon>

</interface>
"He looked at his hands, but the fire in his eyes made him blink."
User avatar
The Man
Vidmaster
Posts: 1203
Joined: Aug 6th '08, 05:23
Location: Sarasota, FL
Contact:

I’m in a rather precarious state of mind right now for reasons I won’t bore you with, so I’m not certain I understand exactly what you want that to do or exactly why it isn’t working, but I find that, when in doubt, it usually pays to look at other people’s working code. Phoenix did something almost identical with some of its weaponry; here’s its IMP55 code.

Code: Select all

  <!-- Pistol to IMP55 -->
  <weapon index="1" shape="37" left="390" multiple="1" multiple_shape="38" multiple_unusable_shape="37" multiple_delta_x="0" multiple_delta_y="0">
   <ammo index="0" bullet_shape="45" empty_shape="46" left="490" top="390" across="32" down="1" delta_x="3" delta_y="7" type="2" />
   <ammo index="1" bullet_shape="45" empty_shape="46" left="490" top="375" across="32" down="1" delta_x="3" delta_y="7" type="2" />
  </weapon>
One thing that immediately jumps out at me in your code is that it’s missing equal signs between each instance of empty_shape and the subsequent inverted commas. I’m not sure if that’s taken from your script or if they somehow got deleted when you copied them over, but if they’re not in your script, that’s your problem (or at least one of them). I haven’t actually tested this because without your shapes file it probably won’t work as intended either way, but it should be:

Code: Select all

 <interface>

  <!-- TR -->
 <weapon index="2" shape="39" left="440" top="370">
   <ammo index="0" type="2" left="390" top="370" across="100" delta_x="4" delta_y="10" bullet_shape="57" empty_shape="58" right_to_left="1" />
   <ammo index="1" type="2" left="390" top="370" across="100" delta_x="4" delta_y="10" bullet_shape="57" empty_shape="58" right_to_left="1" />
  </weapon>

</interface>
(btw, [code]input[/code] will preserve the spacing of your code)
“People should not be afraid of their governments. Governments should be afraid of their people.” —V, V for Vendetta (Alan Moore)

“The trouble is that we have a bad habit, encouraged by pedants and sophisticates, of considering happiness as something rather stupid. Only pain is intellectual, only evil interesting. This is the treason of the artist: a refusal to admit the banality of evil and the terrible boredom of pain. If you can’t lick ’em, join ’em. If it hurts, repeat it. But to praise despair is to condemn delight, to embrace violence is to lose hold of everything else. We have almost lost hold; we can no longer describe happy man, nor make any celebration of joy.” —Ursula K. Le Guin, “The Ones Who Walk Away from Omelas”

“If others had not been foolish, we should be so.” —William Blake, The Marriage of Heaven and Hell

“The law cannot protect anyone unless it binds everyone; and it cannot bind anyone unless it protects everyone.” —Frank Wilhoit

Last.fm · Marathon Chronicles · Marathon Eternal 1.2 · Where Monsters Are in Dreams · YouTube Vidmaster’s Challenge
User avatar
WeirdoYYY
Born on Board
Posts: 69
Joined: Feb 12th '13, 16:59
Location: Mars

Ugh it's always some stupid thing like that haha.

All is good now. Thanks for pointing that out! [MUp]
"He looked at his hands, but the fire in his eyes made him blink."
User avatar
The Man
Vidmaster
Posts: 1203
Joined: Aug 6th '08, 05:23
Location: Sarasota, FL
Contact:

No problem. Anyone who's written code has undoubtedly made syntax errors like that often. It helps to have a second pair of eyes.

Your scenario screenshots look cool. I'll probably say more at some point in the proper thread - limits on post speed prevent me from posting in both places before my break ends, and I'm on my phone, which limits how quickly I can type.
“People should not be afraid of their governments. Governments should be afraid of their people.” —V, V for Vendetta (Alan Moore)

“The trouble is that we have a bad habit, encouraged by pedants and sophisticates, of considering happiness as something rather stupid. Only pain is intellectual, only evil interesting. This is the treason of the artist: a refusal to admit the banality of evil and the terrible boredom of pain. If you can’t lick ’em, join ’em. If it hurts, repeat it. But to praise despair is to condemn delight, to embrace violence is to lose hold of everything else. We have almost lost hold; we can no longer describe happy man, nor make any celebration of joy.” —Ursula K. Le Guin, “The Ones Who Walk Away from Omelas”

“If others had not been foolish, we should be so.” —William Blake, The Marriage of Heaven and Hell

“The law cannot protect anyone unless it binds everyone; and it cannot bind anyone unless it protects everyone.” —Frank Wilhoit

Last.fm · Marathon Chronicles · Marathon Eternal 1.2 · Where Monsters Are in Dreams · YouTube Vidmaster’s Challenge
Post Reply