Jump to content

Niemand

Moderator
  • Posts

    2,138
  • Joined

  • Last visited

Posts posted by Niemand

  1. I would be happy to have your help, WKS. As with all other portions of AScript, I had intended the reference material to be freely available for use anywhere. From a quick bit of research and experimentation JTextPane seems to render HTML tolerably in Java if you're interested in literally using the same set of files for convenience.

     

    EDIT: Now that I've finally gotten through the server errors, I can finally see Kelandons's post and my own. I really misunderstood what you meant then, Kel, but I think that what I'm working on would really be far more useful to me when scripting, at least. I personally find the structuring, or lack thereof, of the wiki to render it almost unusable, the formatting is simplistic at best, and it really the same information or less as in the appendices. To make things clear, nothing is in another application. AScript has a window, which happens to be capable of rendering HTML, in which it displays pages which can have anything on them that we want. I want to be able to do is put the text cursor on a call, press a key, and see the definition and details of the call, so that is what I'm building. It would also be usable as a simple list of calls with the main page listing categories and the category pages linking to the individual calls' pages. Inserting a call is already easy with auto-completion, without having to locate it in a menu or a large list. (Depending on how much of the call you type to start with.)

  2. I'm happy to report that I'm making good progress on completing AScript. It now does simple auto-indentation and is less inclined to lose custom snippet data. Most significantly, I think I've come up with a good way to do the online script call reference, as suggested by Kelandon. I have the engine working, so there's only one thing I lack: content to put in it. I could just copy and paste what Jeff wrote in the Editor manual Appendices, but that has several problems: it would be very laborious, the descriptions even in the newest version are sometimes terse or incomplete, and of course I would have to ask Jeff's permission to use the material. So, I think it would be possible to do better, namely by drawing on the knowledge of the community. The system I have would require an html page, preferably short, for each call, although it would be straightforward and useful to link in pages for groups of related calls and for examples. So, I would like to ask if there's anyone who wants to help me generate this content; I would really appreciate it.

  3. WKS, you can simplify the program a lot if instead of hard coding all of the calls into the menus, you have the program read them in from a file. I put together a quick test like this:

    Code:
    	private void populateCallMenus() throws Exception, FileNotFoundException, IOException{		File file = new File("calls.txt");		BufferedReader in;		in=new BufferedReader(new FileReader(file));		String line;		int lineOn = 0;		int state = 0; //1=valid menu, 2=submenu, 3=item		JMenu curMenu = null;		JMenu curSubMenu = null;		JMenuItem curItem = null;		try{			while((line=in.readLine())!= null){				lineOn++;				line=line.trim();				if(line.indexOf("//")>0){					line=line.substring(0,line.indexOf("//"));				}				if(line.startsWith("M")){					line=line.substring(2);					if(state<1)						state=1;					curMenu = new JMenu(line);					menuBar.add(curMenu);				}				if(line.startsWith("S")){					if(state<1)						throw new Exception("Error: can't create a submenu without a valid menu to put it in.");					line=line.substring(2);					if(state<2)						state=2;					curSubMenu = new JMenu(line);					curMenu.add(curSubMenu);				}				if(line.startsWith("I")){					if(state<2)						throw new Exception("Error: can't create an item without a valid sub-menu to put it in.");					line=line.substring(2);					if(state<3)						state=3;					curItem = new JMenuItem(line);					curItem.addActionListener(this);					curSubMenu.add(curItem);				}							}		}catch(Exception e){			throw new Exception("There was an error while processing line " + lineOn + " of " + file.getName() + ": " + e.getMessage());		}		in.close();	}
    Which reads a file formatted like this:

     

    Code:
    M:Calls 1S:Basic Script and I/O CallsI:print_big_str(string str,short num_to_print,string str2);I:print_big_str_color(string str,short num,string str2,short color);S:Campaign and Scenario CallsI:clear_quest(short which_quest);I:end_scenario(short party_won);M:Calls 2S:Basic Dialog Box CallsI:reset_dialog();I:add_dialog_choice(short which_option,char choice_text);S:Terrain Script and Creature Script CallsI:can_see_loc(short loc_x, short loc_y)I:damage_nearby(short damage_amount,short radius,short damage_type,short good_evil_or_all);
    (M lines specify a new menu, S lines specify a new submenu, and I lines specify menu items.)

     

    Then, to create the menus, you can replace all the existing code with:

    Code:
    		try{			populateCallMenus();		}catch (Exception e){			JOptionPane.showMessageDialog(null, e.getMessage(), "Error while populating menus", JOptionPane.ERROR_MESSAGE);		}
    right between when you add the Edit and Analyse menus to the menubar.

     

    Because I have little experience with jar files, I've just written it so that the calls.txt file has to be in the directory with the jar file, no doubt there's an elegant way to put it inside. Anyway, I just thought you might find this useful.

  4. I tested it, and it really does seem to execute state 13 over and over again without ever going back to the START_STATE. However, I was able to fix it by putting

    Code:
    set_state(START_STATE);
    at the end of state 13. Also, Thralni, you should really use
    Code:
    day4 = day5 % 12; 
    instead of that huge set of if statements.
  5. It would really be pointless to make a checking program try to check that a loop variable is used in the loop. What if I write a loop like:

    Code:
     while(character x is alive){   hurt character x;} 
    Then the loop can be entirely correct, run and finish without actaully using any counter variables at all.

    It basically comes down to the fact that it's impossible to write a program that can verify that another arbitrary program will ever finish executing.

     

    I'll definitely look into the fl_shimmers, SANCTIFICATION_STATE, etc. things though.

  6. I intend to attempt to make a new version of Graphic Adjuster this summer, and I'm hoping to add some kind of support for sounds. however, I'm not sure how well that would work, as the current structure of the program is not well suited to handling more than one type of resource, and I know nothing about sound data and formats. I will be giving it a try, though.

  7. Rezilla is ok but not great; I use it for the things I can't do with Graphic Adjuster.

     

    Thralni, what version of ResEdit are you using? Every version I have seen or used was totally free and unencumbered.

     

    Milu, can you tell me more about the problems you're having with Graphic Adjuster? I'd like to fix it up to work better on the newer versions of the OS.

  8. In a town script, you want to use set_state_continue. In creature scripts you use set_state because the game remembers which state it is running in that script and goes back to that state the next time it runs the script. The game always just calls the START_STATE, so to get another state to run from, say, the INIT_STATE, you have to tell the game to do it immediately.

  9. I'm glad to hear that you like it.

    I'm certainly planning to write documentation for the full release. I don't know about showing all six strings at once when creating a dialog; I agree that it would be helpful, I'm just not sure if I can make that fit in a sheet that won't take up the whole screen. I can also see about renaming Create Note, although I was hoping that the tooltip message would make it's purpose clear. Concerning word wrapping: for some reason this doesn't seem to be affecting windows that are already open, but it does affect all windows opened after the setting is changed. I'll try to fix that.

     

    Also, I've fixed the download link.

  10. *bump*

    I've posted a beta version, 0.9b, on my utilities page . I know that it runs correctly on my 10.4.8 ppc computer, and seems to work on my brother's 10.3.9 computer, but I would appreciate hearing about any other configurations that it does/doesn't run on. I'm hoping that once any bugs are ironed out and so forth, this version will be superseded by a full 1.0 release in a few weeks.

  11. Quote:
    Teleport party does have a sound, though, doesn't it? I think you can activate or deactivate the effect, but can you get rid of the sound accompanying it too?
    You can turn off the sound. Besides, relocating each party member will not work, the party is still considered by the game to be in the same location, so as soon as the player moves, the party will step back where it was before. teleport_party solves this problem.
  12. So far I haven't been able to see what the problem is, but you could simplify your code a great deal by removing text5-text8 if you're not using them, and also the the calls to remove them from each of the if statements.

    Also, you should use teleport_party to kick the party out of the palace.

    To find out more about what's happening, you might toss some print statements into the code section to find out what the flags are really set to, and which parts of the code are really running.

  13. Quote:
    Is there any way stop them from leaving fight mode?
    Not really. You could do something like what Kelandon did in Bahs and punish the player for leaving combat mode, but that's about all. (I would also remark that this method alone is not necessarily very effective. My whole party died repeatedly in Bahs before I figured it out, because I didn't realise that if I enetered combat mode I would stop taking damage.)
  14. Sorry, this is my last week of classes for this semester, so it's a little hectic. I'm hoping less than a month to a beta, depending on how things go.

     

    Since my last update, I have gotten a couple of things done:

    -The program no longer crashes when you erase all the text in the file.

    -You can set the colors used for syntax coloring.

    - Code Completion! Type part of a BoA keyword or function call, then press a key combination (Opt+Space), and you get to see a list of all the possible matches. The functions have placeholders for their parameters, contained within pairs of '#' characters.

    -Cmnd+open bracket or close bracket selects the text contained by the previous or next pair of '#' characters, for quickly selecting the placeholder function arguments.

     

    My current to-do list contains:

    -Add an auto indent feature

    -Fix slowness of text insertion

    -Touch up Alint; I'll have to check but I think I might have found a couple of minor things that it incorrectly flags as errors.

    -Add quick code generators for floor, terrain, creature, and item definitions

    -Make a quick generator for dialogue nodes

    -Make application modal windows work (I seem to have broken them somehow.)

    -Try to make a nice spell check: This may be tricky. Apple's spell checking implementation doesn't seem to have been intended for any degree of customization by developers. I may end up doing the same thing as astring, but I'd really like a more elegant and user friendly system.

    -Try to make some type of online help: This is kind of a long shot. I think it would be great to have, but figuring out how to implement it will be tricky, and even once the implementation is in place, it would need a lot of content put into it to make it really useful. Could be very time consuming. THis might be a feature to put off for a possible version 2, so as not to delay version 1 indefinitely.

×
×
  • Create New...