Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - joe davis

Pages: [1] 2
Newbie Coding / Scripting questions, don't know if that constitutes coding
« on: February 15, 2010, 12:34:44 am »
So, I am a Newb and would like to study the game and have decided to start with scripting since that seems to be the easiest and the most visible in regards to having more instant visual feedback.  I figure I should try to learn how to crawl before trying to learn how to run.  

So I checked out the documentation on the wiki and have more questions.  

A user requested a modification and I wanted to see what it would entail to make a user modification for it.  The request was to add checkboxes next to the effects_str and the music_str to turn them off and on similar to the checkbox sound_init node.  He posted a pic  here:

I added the checkboxes and have obtained general functionality, but I am not satisfied with my results and have generated a few questions, which I find to be a positive thing as my primary interest is more in studying than making this work.

Code: [Select]
checkbox effects_box
current *cvar:snd_volume
pos "85 170"
size "20 18"
image "ui/checkbox_blue"
Code: [Select]
checkbox music_box
current *cvar:snd_music_volume
pos "85 195"
size "20 18"
image "ui/checkbox_blue"

This works well enough in regards to setting the volume to 0.0 when it is unchecked.  
However I run into a couple of various concerns and snags:

1. When I re-check the checkbox from an unchecked state, each of the volumes respond differently.  
a. The effects volume is changed to 1.0 I would assume, ie. it is turned all the way up.
b. The music volume is changed to what appears to be 0.1 or just a sliver.

The questions this brings to mind is:
A. can I assign a value to the *cvar(s) in the onClick event?  like
Code: [Select]
*cvar:snd_volume = 0.5
B. How can I check if the checkbox is checked or not?  This did not seem to work:
Code: [Select]
onClick {if (*node:this@current < 1) { *cvar:snd_volume = 0.5}
         if (*node:this@current > 0) { *cvar:snd_volume = 0.0}

C. How could I click another node from within an onClick event.  For example user clicks on checkbox and I check if supposed to be at 0.0 or 0.5 volume based whether checked or not and then I click on the appropriate bar, for example the effects_bar, at the appropriate location(ie 0.0 or 0.5)?  

D. If the user clicks on the bar how could I code the onClick event in the bar to check or uncheck the checkbox?

2. Is there a method of saving the original position of the sound prior to me hitting the checkbox to turn it off so that when I re-check the checkbox I can place it at the original position instead of the current positions of 1.0 and 0.1 or my proposed position 0.5?

User modifications / Mouse position in Debug_menu
« on: February 13, 2010, 04:00:26 pm »
Is there a way of getting the mouse position when using debug_menu?  If not, is there a way of adding that ability by the devs.  I feel that would help with position layout for users who want to modify their menus.  Maybe display the mouse x,y positions right by the mouse, or even under the menu stack display.

Feature Requests / Start Production at 0 instead of 1
« on: February 12, 2010, 05:10:24 am »
I click on start production and then I want to make 10 items.  I click on the 10x and I get 11.  Seems silly but starting at 0 is more natural I think. 

When I am in the Equipment screen and I am giving my units what I want them to carry and then decide that I would like to put the ammo in a different container so that I could put my smoke grenade and I. Grenade in the belt container.  I click on the ammo to move it and the tab changes to the Primary Tab from the Misc. Tab, usually.  But the thing is, is that I am on the Misc. Tab for a reason and dragging the ammo out of that container so that I can buy something from the Misc. Tab. 
The only time it makes sense to change the tab is if I click on a weapon, which I most likely will just click that Tab to get that ammo type if I decide I want more ammo for that weapon later.

Feature Requests / Get to Market menu from Equipment Menu
« on: February 12, 2010, 05:00:14 am »
I would like to be able to push the market menu from the equipment menu so that I can request weapons, armour, equipment, etc. for my units instead of having to back all the way out.  I guess while I am requesting it, being able to push production menu from equipment menu may also make sense.

Discussion / Strategic Weapon implementation status?
« on: February 10, 2010, 07:11:49 pm »
Does the flashbang do anything right now?

Are the incendiary weapons implemented?  I throw an I. Grenade and I get some animation from the grenade but no flame in the general area afterwards.  Is this a graphics glitch I am experiencing?

More cowbell... ok maybe not, but what about the Proximity Grenade?  Why don't we have a Proximity Grenade?  I liked the Proximity Grenade, someone or something walked by it and BOOM!  You know ya got love it!  Ok, maybe the civilians don't like it but that brings up my next question.

And what about some new ammo like bean bags.  I want to throw bean bags at the civilians that are too stupid to run away.  And sometimes, when I forget, I shoot them with saboted shells and notice the pile of blood and scream, NO, I forgot to change the ammo.  lol. Could be fun!


Coding / Where can I find more on commands and dataids for menu scripts?
« on: February 07, 2010, 10:06:58 pm »
I was wondering if there was a list of the cmd or @(like @edit or @click) commands used in the menu scripts somewhere?  I was also wondering if there was a list of Dataid's that are being used.  Also is there more documentation other than the wiki scripting that may describe the use of <1> <2> which seems to be used like arrays, but not sure where they are defined.  Also ran across a mention of using unique character numbers and would like to know more about that.  I appreciate your time and feedback.  Thank you.  Sorry if I am confused about what I am looking for.  Trying to study the scripting, and modifying the menus so far.

I was wondering if there was a What you see is what you get, drag and drop, rapid layout management designer application for menu creation?  Something that uses a canvas and toolbars from which one may select a widget, component, or whatever you want to call it, from the toolbar and drag it to the canvas to generate a visual layout of the menu, and which can also generate basic menu code of node position and node sizes? 

Or are there any tools that are currently being used to speed up the menu layout?

Feature Requests / Mark as turn finished
« on: January 31, 2010, 10:22:18 pm »
Being able to use the tab button to cycle through units is nice, and being able to use num pad to cycle is sweet too.  I would also like to have the ability to mark my units turn as being done.  Then when I hit tab the unit doesn't get selected. The number at the top, representing the unit, could also be changed to a different color.  A new button next to the stand up\squat toggle button to set as turn is finished would be nice.  And a hotkey would be nice too.  This would help with managing the units turn better.

This is not a unique idea, and was implemented in the original, tftd, or playstation version of ufo defense, if not all of them.  Forget which it was, sorry.  And it seemed to work well.

Feature Requests / Production Menu
« on: January 31, 2010, 06:12:11 pm »
I would like more detailed information in the Production Menu.  I would like the item autosell checkbox like is present in the buy\sell menu.  I would like a listing of the price I can sell the item for listed so that when my workers are not generating supply production I can have them generate revenue.  I would also like a listing of the quantity I have of each item and how many is available from sellers, like is currently listed in the buy\sell menu, so I can make a better informed decision on what needs produced for supplies without jumping to the buy\sell menu. 

Basically I want the buy\sell information in the production menu so that I can make a better informed decision on production without having to go to the buy\sell menu. :P

User modifications / Changing Unit's name in Equipment menu help
« on: January 29, 2010, 09:04:35 pm »
I was attempting to modify the equipment menu where I equip my units in the aircraft.  In the section   
     // ==================
     // inventory
     // ==================
directly under:
   string txt_actorname
      string   *cvar:mn_name
      pos      "544 24"
      size   "300 20"

I inserted this code that I copied and modified from the hire.ufo:
      textentry name
      string      *cvar:mn_name
      pos         "539 24"
      size      "300 20"
      onChange   { cmd "employee_changename;" }

      pic bt_edit
      tooltip      "_Rename your unit"
      image      ui/buttons_small
      pos         "780 24"
      texl      "0 48"
      texh      "16 64"      

The above code works fine in allowing me to click on the text, but not the pen icon, to change the text there.  However it does not save the changes I put here to the units name.  Any ideas what I need to do to make this work?

The speed of the bullets in reaction fire makes my 3 or 5 bullet volley look more like a shotgun blast.  Also I can't tell which of my men is shooting in reaction fire.

Bugs prior to release 2.3 / 7 on number pad brings up radar not 7th unit
« on: January 27, 2010, 02:45:00 am »
When using the numeric keypad to cycle through units when I hit 7 I get a radar pop up and it doesn't switch to the 7th unit.

Discussion / Another Reaction Fire Question
« on: January 20, 2010, 08:44:34 pm »
I don't understand the reason for the new reaction fire reservation menu.  I designate the type of shot I want to perform in reaction time by a check in the shot selection already.  Which by the way, I love this  ;D.  Why do I need to select the shot type again in a different menu?  I was spoiled with the old way of selecting reaction fire reservation ::), click for one, click for several, click for off, easy.  Now I got pop ups and it takes me longer, and I got to think more...for what :'(?  Sorry for whining, but for real though, what's up with that?

So I was all set with my base, I had my units renamed, they were all wearing uniforms with colors for their duties, they all had their weapon configurations set up, I had research going, production happening, you know the drill, I go on first away mission and I says to myself, I says, I want Full Screen, so I change it.  Boom!!!  No notification, no take backs, changes to full screen but I lose everything.:'(  LOL, JK on the drama, but true story.  Think someone can throw us a freaking bone here people?  lol.  A little notification that changing to Full Screen will restart you would suffice.

Pages: [1] 2