IJass pre-release, ways to improve?

Executor

I see you
Reaction score
57
Hi,

I'm atm working on a project called "IJass" (Ingame Jass), which will allow the user to use jass code via chat ingame designed for debugging purposes (or even a JASS - battle game? :D).

I post the readme and the current code.

JASS:
// Hello and welcome to my IJass readme.
// 
// First of all: 
//
// "IJass? Whats that?"
//
// - "IJass" stands for "Ingame Jass". This means you use jass code (indirectly) while ingame.
//   ~ indirectly ~ because of every single native you may use exists one wrapped function
//   in my library. That's why my library is so big.   
//
// "Okee and how do I do this "IJass" - thing?"
//
// Well, have a look at the interface, it should explain itself. But you should have in mind,
// that YOU have to know the natives you want to use, aswell as unit ids and so on.
// 
// In the case you configured IJass in a way, that COMMAND_PREFIX is not "" you ALWAYS
// have to type the char you filled this variable with in front of your IJass commands. Other
// inputs will be recognized as plain text and not as a command.

// the (ingame) interface:

// *************************** INTERFACE ****************************************************

//  Jass: "call CreateUnit(Player(0),'hfoo',0.,0.,0.)"
// IJass: "CreateUnit(Player(0),'hfoo',0.,0.,0.)

// there are also some enhancements out there:

// you can skip parameterinput, this means the rest of the parameters will be filled with the 
// specific null value of the type:
// "CreateUnit(Player(0),'hfoo',0.,0.,0.)" equals "CreateUnit(Player(0),'hfoo')"
// this only works, if you skip the parameters till the end of the function.

// you may assign variables:
//  Jass: "set somePlayerVar = Player(0)" or "set someUnitVar = CreateUnit(..)"
// IJass: "someVar = Player(0)"           or "someVar = CreateUnit(..)"
// YES, you may assign every type you want, but it's your turn to check whether you use them
// right or not. Assigning one variable-name twice will override the old value

// you may also combine aspects:
//              Jass: "set myPlayer = Player(0)"
//              Jass: "call CreateUnit(myPlayer,'hfoo',0.,0.,0.)"
// becomes
// combined => IJass: "CreateUnit(myPlayer = Player(0), 'hfoo', 0., 0., 0.)"
//
// shorter =>  IJass: "CreateUnit(myPlayer = Player(0), 'hfoo')"

// another example:
// "myUnit = CreateUnit( myPlayer = myCoolPlayer = Player(0), myID = 'hfoo')"
// "KillUnit(myUnit)"

// ************************** END INTERFACE *************************************************


system code to long for the post, so here it is

Atm only CreateUnit, BJDebugMsg, UnitAddAbility, SetUnitState, Player are included.

Which spaces will be deleted?
061209132944_ShowStringErase.jpg



This system is NOT finished yet, I only want to gather some ideas to improve :)
 

Attachments

  • IJass.w3m
    88.2 KB · Views: 180

Hatebreeder

So many apples
Reaction score
381
Hmmmmmz.. o_O

This is cool :'D I can think of fun stuff to do xD

But, one question: when you execute a command, what type does it have to be typecasted to?

like, you type: call KillUnit(thatunit)

What type does "KillUnit(thatunit)" have to be? Since I don't think you can execute strings, no?
 

Executor

I see you
Reaction score
57
"thatunit" => "THATUNIT" (not case sensitive).
"THATUNIT" has a hashtable reference to a "Data"-struct-instance.

JASS:

struct Data
    integer TYPE
    string   value
endstruct


If you stored a unit lately in "THATUNIT" you can simply call "KillUnit(thatunit)" but if you stored a integer in "THATUNIT" you will get an error.
 

Hatebreeder

So many apples
Reaction score
381
Oh i see. So you made everything use one struct?

Hmmm... I thought, that you'd have some chat event going on.
I didn't look in the Map and the Code yet, but I was assuming that you had "call" as an indicator for [ljass] call ExecuteFunc(string) [/ljass] blabla.

But then again, it had to be a function. Which would mean, that you could only call GUI related functions and used the variables that already existed in the game at that time... Like, call KillUnit(SomeSpellStruct_Data.Caster)

EDIT: not too sure if you are able to give the function any parameters....
 

Executor

I see you
Reaction score
57
No, it's a little bit more work :p

The reason, why you may only use these 5 functions atm is, that I have to wrap EVERY function, you will be able to use ingame.
And I wait with the writing-a-little-program-which-converts-every-native-in-such-a-wrapped-native-process, till I know definitly that I won't modify anything anymore :)

@Hatebreeder, I suggest you'll have to test it simply :D
 

Hatebreeder

So many apples
Reaction score
381
No, it's a little bit more work :p

The reason, why you may only use these 5 functions atm is, that I have to wrap EVERY function, you will be able to use ingame.
And I wait with the writing-a-little-program-which-converts-every-native-in-such-a-wrapped-native-process, till I know definitly that I won't modify anything anymore :)

@Hatebreeder, I suggest you'll have to test it simply :D

UnitAddAbility(Unit,Ability) doesn't work :D
same for UnitState....

But CreateUnit(Player,Unit) works
 

Executor

I see you
Reaction score
57
Hm, it does work on my pc.

Try the following:

  • myUnit = CreateUnit(Player(0),'hfoo')
  • SetUnitState(myUnit,UNIT_STATE_LIFE,100.)
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
>And I wait with the writing-a-little-program-which-converts-every-native-in-such-a-wrapped-native-process, till I know definitly that I won't modify anything anymore

Post the format needed and I could write that in a couple of minutes.
 

Executor

I see you
Reaction score
57
Yea, UnitAddAbility works NOW :D somehow forgot to add [ljass]//! runtextmacro AddNative("UnitAddAbility")[/ljass] (updated the map.)

@phyrex1an
Ty for your help, but I already have this program, it's just that I'm not totally sure with the wrap-syntax and therefore don't want to rewrite this program + the total code every day.
 

Nexor

...
Reaction score
74
Hah, try to avoidthings like creating unit to a non-existing player
I tried creating a footman for Player(16) and crit error happened.

Anyway it's a nice thing!

Oh andthe BJDebugMsg does ignore spaces, like: BJDebugMsg(hello I'm so nice!)

And it displays: helloI'msonice!
 

Executor

I see you
Reaction score
57
Hah, try to avoidthings like creating unit to a non-existing player
I tried creating a footman for Player(16) and crit error happened.

Anyway it's a nice thing!

Oh andthe BJDebugMsg does ignore spaces, like: BJDebugMsg(hello I'm so nice!)

And it displays: helloI'msonice!

Hm yea, I delete all spaces of the string, thats easier to analyse. I'll see what I can do.
Hm this Player(16) thingy will be hard to fix, because I would have to declare bounds for several convert-natives.

Wolfie had already do something like that.

Link?
 

saw792

Is known to say things. That is all.
Reaction score
280
I started making something like this with bytecode at one point. That would have allowed every possible combination of commands in much less space, that is until I got bored constructing functions out of hex commands.

This is quite cool... if only this was even slightly useful.
 

Executor

I see you
Reaction score
57
Updated, now not all spaces are erased.

Constructive criticism on the library mechanics or the interface or sth.?
 

Executor

I see you
Reaction score
57
Hm, I'm thinking about some kind of dynamic functions or boolexpr (especially for enum).
Basically this would be an array of string, evaluated on call.
Not usuable? Opinions?
 

aliminator8

New Member
Reaction score
3
being able to create a trigger in game would be pretty awsome....event --> condition --> action kinda thing... now that i think about it, perhaps a built in function that will show all the code in a function/trigger in game and its links to other functions and variable use data too
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top