[ DEV ] InfinityScript Suggestions

InfinityScript plugins for dedicated servers.
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

[ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Sat Jan 30, 2016 8:24 pm

So lately, I've been wondering "just how much can we tweak IW5?". Turns out, ALOT.
InfinityScript basically has mapped most, if not all GSC functions which we can make use of.
It really shouldn't be that hard to make MW3 something akin to MW2 in terms of development.

Just take a look at all the available functions:

Code: Select all

            AddFieldMapping("code_classname", 0);
            AddFieldMapping("classname", 1);
            AddFieldMapping("origin", 2);
            AddFieldMapping("model", 3);
            AddFieldMapping("spawnflags", 4);
            AddFieldMapping("target", 5);
            AddFieldMapping("targetname", 6);
            AddFieldMapping("count", 7);
            AddFieldMapping("health", 8);
            AddFieldMapping("dmg", 9);
            AddFieldMapping("angles", 10);
            AddFieldMapping("birthtime", 11);
            AddFieldMapping("script_linkname", 12);
            AddFieldMapping("slidevelocity", 13);
            AddFieldMapping("name", 24576);
            AddFieldMapping("sessionteam", 24577);
            AddFieldMapping("sessionstate", 24578);
            AddFieldMapping("maxhealth", 24579);
            AddFieldMapping("score", 24580);
            AddFieldMapping("deaths", 24581);
            AddFieldMapping("statusicon", 24582);
            AddFieldMapping("headicon", 24583);
            AddFieldMapping("headiconteam", 24584);
            AddFieldMapping("kills", 24585);
            AddFieldMapping("assists", 24586);
            AddFieldMapping("hasradar", 24587);
            AddFieldMapping("isradarblocked", 24588);
            AddFieldMapping("radarstrength", 24589);
            AddFieldMapping("radarshowenemydirection", 24590);
            AddFieldMapping("radarmode", 24591);
            AddFieldMapping("forcespectatorclient", 24592);
            AddFieldMapping("killcamentity", 24593);
            AddFieldMapping("killcamentitylookat", 24594);
            AddFieldMapping("archivetime", 24595);
            AddFieldMapping("psoffsettime", 24596);
            AddFieldMapping("pers", 24597);
            AddFieldMapping("veh_speed", 32768);
            AddFieldMapping("veh_pathspeed", 32769);
            AddFieldMapping("veh_transmission", 32770);
            AddFieldMapping("veh_pathdir", 32771);
            AddFieldMapping("veh_pathtype", 32772);
            AddFieldMapping("veh_topspeed", 32773);
            AddFieldMapping("veh_brake", 32774);
            AddFieldMapping("veh_throttle", 32775);
            AddFieldMapping("x", 0);
            AddFieldMapping("y", 1);
            AddFieldMapping("z", 2);
            AddFieldMapping("fontscale", 3);
            AddFieldMapping("font", 4);
            AddFieldMapping("alignx", 5);
            AddFieldMapping("aligny", 6);
            AddFieldMapping("horzalign", 7);
            AddFieldMapping("vertalign", 8);
            AddFieldMapping("color", 9);
            AddFieldMapping("alpha", 10);
            AddFieldMapping("label", 11);
            AddFieldMapping("sort", 12);
            AddFieldMapping("foreground", 13);
            AddFieldMapping("lowresbackground", 14);
            AddFieldMapping("hidewhendead", 15);
            AddFieldMapping("hidewheninmenu", 16);
            AddFieldMapping("glowcolor", 17);
            AddFieldMapping("glowalpha", 18);
            AddFieldMapping("archived", 19);
            AddFieldMapping("hidein3rdperson", 20);
            //AddFieldMapping("targetname", 0);
            //AddFieldMapping("target", 1);
            AddFieldMapping("script_linkname", 2);
            AddFieldMapping("script_noteworthy", 3);
            //AddFieldMapping("origin", 4);
            //AddFieldMapping("angles", 5);
            AddFieldMapping("speed", 6);
            AddFieldMapping("lookahead", 7);


Those are just for ENTITIES.
There's three times that amount for general GSC functions.

Many of you older members would remember back when TeknoMW3 was purely dependant on the MW3 server addon by zxz0O0 and Nukem.
I went over the source of that and turns out it's quite do-able and able to be implemented easily into InfinityScript.

One recommendation would be to:

- Add a Menu class ( Ability to create and edit Client-Sided menus on-the-fly using a combination of ActionKeys and HudElements )
- Implement w/ proper documentation, the total available MW3 GSC functions mapped via AddFieldMapping/AddFunctionMapping.

That way, we'd easily be able to develop proper mods.
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Sat Jan 30, 2016 10:04 pm

I'd be interested in working on a better InfinityScript overall.

Though the current state of teknomw3 makes me wonder if i's worth it.
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Feb 01, 2016 12:42 am

I actually had the idea at one point to pre-write all the GSC functions into actual IS functions so that people wouldn't have to use "Call()" and so they'd know the arguments of the function (Ex. would be instead of using Call("aFunction", arg1); it'd just be aFunction(arg1);). If someone does start creating a modified IS, I could do that at least. I'm sure it'd help out newcomers to scripting!

As a side note, those field mappings are Entity fields, not really functions. Those are used with "SetField" and are the pre-defined fields that IS can Get/Set normally. Oddly, fields that are defined in GSC can't be gotten by IS and some can't even be set... =P
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Mon Feb 01, 2016 12:56 am

Currently working on it as we speak.
Added several fields to Entity

- IsVisible - Checks if targetEntity is visible
- Suicide - Kills the player/entity
- IsRagdoll - Players that die become ragdolls but may still be part of events. Use this to determine if they are actually valid.
- IsValid - Determines if the entity is valid
- IsOnLadder - Self explaining
- IsMantling - Whether the player is currently moving over an object.
- GetClassNumber - Get's the entity's class index ( default_1 to default_5 and custom_class1 to custom_class15 )
- RadarJammed - Whether the player has a jammed radar
- Rank - Player's rank ( Get/Set )
- Prestige ( Get/Set )

- Player Stats ( Kills, Deaths etc. ) - All as a retrievable get{} method
- SetPersistentDvar - Sets a dvar the client saves even after leaving the server and restarting their game


Image
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Feb 01, 2016 1:53 am

Interesting that the "pers" field returns as null by IS...

Code: Select all

Exception during RunAll call: System.InvalidCastException: Null object can not be converted to a value type.


I should've guessed anyway since it returns an array that isn't manageable by C# =P
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Mon Feb 01, 2016 2:41 am

Slvr99 wrote:Interesting that the "pers" field returns as null by IS...

Code: Select all

Exception during RunAll call: System.InvalidCastException: Null object can not be converted to a value type.


I should've guessed anyway since it returns an array that isn't manageable by C# =P

What does "pers" field supposed to do or is supposed to contain?
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Feb 01, 2016 12:33 pm

c4271605 wrote:
Slvr99 wrote:Interesting that the "pers" field returns as null by IS...

Code: Select all

Exception during RunAll call: System.InvalidCastException: Null object can not be converted to a value type.


I should've guessed anyway since it returns an array that isn't manageable by C# =P

What does "pers" field supposed to do or is supposed to contain?

"pers" contains persistant data for each match like killstreak data, some loadout data, and general match data. It uses a GSC Array, meaning we can't use it in C#.
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Mon Feb 01, 2016 3:25 pm

c4271605 wrote:- SetPersistentDvar - Sets a dvar the client saves even after leaving the server and restarting their game

Well that caught my eye. Is it a built-in function?

And about the modified IS you are coding, you might want to wait for the tg4.0 update. There are some new things in there.

P.S. Glad you aren't a .NET-sucks-scrub.



User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Feb 01, 2016 5:14 pm

Lambder wrote:
c4271605 wrote:- SetPersistentDvar - Sets a dvar the client saves even after leaving the server and restarting their game

Well that caught my eye. Is it a built-in function?

I'm pretty sure Client DVARs save after leaving a server/restarting =P
Not much use with them though since you can't access client DVARs anyway.
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Mon Feb 01, 2016 7:03 pm

Lambder wrote:
c4271605 wrote:- SetPersistentDvar - Sets a dvar the client saves even after leaving the server and restarting their game

Well that caught my eye. Is it a built-in function?

And about the modified IS you are coding, you might want to wait for the tg4.0 update. There are some new things in there.

P.S. Glad you aren't a .NET-sucks-scrub.

Yep, it is.

Edit, you can access client dvars tho :|

Return to “InfinityScript”

Who is online

Users browsing this forum: No registered users and 2 guests