Giter VIP home page Giter VIP logo

library's Introduction

Sanny Builder Library

Discord

A platform for collaborative editing and maintaining documentation for the GTA 3D series games, with a focus on scripting and native code.

Available online at https://library.sannybuilder.com/

Features

  • All scripting commands for GTA III, Vice City and San Andreas, including CLEO4, CLEO5 and CLEO Redux extensions, complete with types and examples
  • Advanced filtering and search functionality
  • Convenient online editor for authorized users (see Contributing) that allows changes to be committed directly from the browser to GitHub
  • Up-to-date configuration files for use with Sanny Builder 4 and CLEO Redux
  • Responsive design optimized for mobile devices

Contributing

Sanny Builder Library is an open project where anyone can contribute. If you are looking for ways to participate in the project or want to get access to the online editor tool, drop a message in our Discord and we will sort this out.

Credits

Information presented here is attributed to many talented individuals in the GTA modding community.

library's People

Contributors

cowboy-69 avatar emil6strutui avatar juniordjjr avatar matidragon-yt avatar mirandmc avatar orionsr avatar squ1dd13 avatar user-grinch avatar vitalrus95 avatar wmysterio avatar x87 avatar xchillax avatar xmds avatar yuksel-kadir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

library's Issues

add class/enums descriptions

use compound keys from translation files to get the class description.

classes.<className>.description
enums.<enumName>.description

add platform tags

  • platform_any
  • platform_pc
  • platform_mobile
  • platform_console

could be multi-choice

allow opcode notation

toggle between default display (ClassName.ClassMember) and low-level opcode notation:

When class notation is on:

[var handle: Player] = Player.Create(model: int, x: float, y: float, z: float)
[var handle: CarGenerator] = CarGenerator.Create(x: float, y: float, z: float, heading: float, modelId: int, primaryColor: int, secondaryColor: int, forceSpawn: bool, alarmChance: int, doorLockChance: int, minDelay: int, maxDelay: int)

When opcode notation is on

0053: create_player model [int] x [float] y [float] z [float] store_to [var handle: Player]
014B: create_car_generator x [float] y [float] z [float] heading [float] modelId [int] primaryColor [int] secondaryColor [int] forceSpawn [bool] alarmChance [int] doorLockChance [int] minDelay [int] maxDelay [int] store_to [var handle: CarGenerator]

Packed data for use in web instead of verbose JSON files

Currently the library needs information about all games at once for all features to work correctly (making related updates, showing support info). SupportInfo has been prepackaged as a single file for use in the library (one single http call instead of 9).

Given the ratio of updates to views it makes sense to pack game json files into a single file to deliver in one call instead of 9. The low rate of updates will keep it cached for users most of the time.

Also consider using binary format for smaller file size. Currently all 9 JSON files are 7.8Mb combined.
support-info.json is 4.4 Mb

Can't download vc_classic/enums.txt

Trying to open https://library.sannybuilder.com/assets/vc_classic/enums.txt redirects me to https://library.sannybuilder.com/#

Is this a problem on my side? I was able to download the other 2 files: classes.db and keywords.txt

support for enum types

  • display in types dropdown
  • add/remove/edit enum items
  • add in classes.db not needed
  • update commands on enum rename or delete
  • generate enums.txt

Limit model ids in different constructor opcodes

Enum type with models for boat/car etc? It would be great to see an autocomplete for enum types.

Btw, Sanny already supports autocomplete for both models and enum values in classes.

adding static enum for different model types might not be possible as it depends on user configuration (they may have custom model ids). I'm not sure how to tell Sanny that we want only a subset of models that have a specific type. It could be a separate semantic type (model_boat or model_heli in addition to model_any and model_ide) but it appears to be a very niche use case to support in the type system.

I will create a ticket to follow up on this discussion.

Originally posted by @x87 in sannybuilder/dev#136 (reply in thread)

Unconventional param order in some CLEO4 opcodes

https://library.sannybuilder.com/#/sa/CLEO/0AD4?p=1&v=1
Text.ScanString(str: string, format: string, args: arguments, var text: string)
but in CLEO args goes after var text
0AD4=-1,%3d% = scan_string %1d% format %2s%

UPDATE: CORRECTED
Text.ScanString(string: string, format: string, var nValues: int, var values: arguments): bool

https://library.sannybuilder.com/#/sa/CLEO/0AD3?p=1&v=1
Text.StringFormat(format: string, args: arguments, var text: string)
in CLEO var text goes first, then format then args
0AD3=-1,%1d% = string_format %2s%
UPDATE: CORRECTED

https://library.sannybuilder.com/#/sa/CLEO/0ADA?p=1&v=1
File.Scan(self: File, format: string, args: arguments, var text: string): bool
in CLEO file, then format, then var text, then args
0ADA=-1,%3d% = scan_file %1d% format %2d% // IF and SET

UPDATE: CORRECTED
File.Scan(self: File, format: string, var nValues: int, var values: arguments): bool

support overloaded commands

02CF START_SCRIPT_FIRE => ScriptFire.Create(x: float, y: float: z: float)
0325 START_CAR_FIRE => ScriptFire.Create(handle: Car)
0326 START_CHAR_FIRE => ScriptFire.Create(handle: Char)

Add page system

View of: [25^]

When loading the database (.json) the website starts to demand too much resources, making the browser not work properly and making it impossible to edit the opcodes.

Maybe if it is saved in the browser's cache it will help a little, but maybe it will help even more if a paging system is put in place :)

[1] [2] ... [<] [55] [>] ... [232] [233]

fix getter check for GTA IV command

Command which name starts with GET_ must have at least an output param or have 'is_condition' attribute

Error: name: GET_CAMERA_FROM_NETWORK_ID, extension: default
Error: name: GET_CELLPHONE_RANKED, extension: default
Error: name: GET_CLOSEST_NETWORK_RESTART_NODE, extension: default
Error: name: GET_CONTENTS_OF_TEXT_WIDGET, extension: default
Error: name: GET_COORDINATES_FOR_NETWORK_RESTART_NODE, extension: default
Error: name: GET_DESTROYER_OF_NETWORK_ID, extension: default
Error: name: GET_FILTER_MENU_ON, extension: default
Error: name: GET_FURTHEST_NETWORK_RESTART_NODE, extension: default
Error: name: GET_GAMER_NETWORK_SCORE, extension: default
Error: name: GET_GFWL_HAS_SAFE_HOUSE, extension: default
Error: name: GET_GFWL_IS_RETURNING_TO_SINGLE_PLAYER, extension: default
Error: name: GET_HOST_ID, extension: default
Error: name: GET_HOST_MATCH_ON, extension: default
Error: name: GET_INTERIOR_FROM_DUMMY_CHAR, extension: default
Error: name: GET_LOCAL_GAMERLEVEL_FROM_PROFILESETTINGS, extension: default
Error: name: GET_MOBILE_PHONE_POSITION, extension: default
Error: name: GET_MOBILE_PHONE_ROTATION, extension: default
Error: name: GET_MODEL_NAME_FOR_DEBUG, extension: default
Error: name: GET_MODEL_NAME_OF_CAR_FOR_DEBUG_ONLY, extension: default
Error: name: GET_MOTION_CONTROLS_ENABLED, extension: default
Error: name: GET_NAME_OF_SCRIPT_TO_AUTOMATICALLY_START, extension: default
Error: name: GET_NEEDED_PLAYER_CASH_FOR_LEVEL, extension: default
Error: name: GET_NETWORK_ID_FROM_PED, extension: default
Error: name: GET_NETWORK_ID_FROM_VEHICLE, extension: default
Error: name: GET_NETWORK_PLAYER_VIP, extension: default
Error: name: GET_NETWORK_RESTART_NODE_DEBUG, extension: default
Error: name: GET_NETWORK_TIMER, extension: default
Error: name: GET_NO_OF_PLAYERS_IN_TEAM, extension: default
Error: name: GET_NUM_CONSOLE_COMMAND_TOKENS, extension: default
Error: name: GET_OBJECT_FROM_NETWORK_ID, extension: default
Error: name: GET_ONLINE_LAN, extension: default
Error: name: GET_OVERRIDE_NO_SPRINTING_ON_PHONE_IN_MULTIPLAYER, extension: default
Error: name: GET_PARKING_NODE_IN_AREA, extension: default
Error: name: GET_PED_AT_HEAD_OF_QUEUE, extension: default
Error: name: GET_PLAYER_NAME, extension: default
Error: name: GET_PLAYER_POINTS, extension: default
Error: name: GET_PLAYER_RANK_LEVEL_DURING_MP, extension: default
Error: name: GET_PLAYER_TO_PLACE_BOMB_IN_CAR, extension: default
Error: name: GET_RANDOM_NETWORK_RESTART_NODE, extension: default
Error: name: GET_RANDOM_NETWORK_RESTART_NODE_EXCLUDING_GROUP, extension: default
Error: name: GET_RANDOM_NETWORK_RESTART_NODE_OF_GROUP, extension: default
Error: name: GET_RANDOM_NETWORK_RESTART_NODE_USING_GROUP_LIST, extension: default
Error: name: GET_REMOTE_CONTROLLED_CAR, extension: default
Error: name: GET_RETURN_TO_FILTER_MENU, extension: default
Error: name: GET_ROOM_NAME_FROM_CHAR_DEBUG, extension: default
Error: name: GET_SAFE_LOCAL_RESTART_COORDS, extension: default
Error: name: GET_SEQUENCE_PROGRESS_RECURSIVE, extension: default
Error: name: GET_SERVER_ID, extension: default
Error: name: GET_SORTED_NETWORK_RESTART_NODE, extension: default
Error: name: GET_SORTED_NETWORK_RESTART_NODE_EXCLUDING_GROUP, extension: default
Error: name: GET_SORTED_NETWORK_RESTART_NODE_OF_GROUP, extension: default
Error: name: GET_SORTED_NETWORK_RESTART_NODE_USING_GROUP_LIST, extension: default
Error: name: GET_SPAWN_COORDINATES_FOR_CAR_NODE, extension: default
Error: name: GET_START_FROM_FILTER_MENU, extension: default
Error: name: GET_TEAM_COLOUR, extension: default
Error: name: GET_TEAM_RGB_COLOUR, extension: default
Error: name: GET_TOTAL_NUMBER_OF_PEDS_KILLED_BY_PLAYER, extension: default
Error: name: GET_VEHICLE_CLASS, extension: default
Error: name: GET_VEHICLE_FROM_NETWORK_ID, extension: default
Error: name: GET_KILL_TRACKING_RESULTS, extension: default
Error: name: GET_LAST_TIME_NETWORK_ID_DAMAGED, extension: default
Error: name: GET_LCPD_COP_SCORE, extension: default
Error: name: GET_LCPD_CRIMINAL_SCORE, extension: default
Error: name: GET_NUM_KILLS_FOR_RANK_POINTS, extension: default
Error: name: GET_ONLINE_SCORE, extension: default
Error: name: GET_PLAYER_LCPD_SCORE, extension: default
Error: name: GET_NETWORK_JOIN_FAIL, extension: default

snippet search

snippet: to search in snippets content

show/hide button for snippet content in the central list where available

support derived classes (Car and Heli/Boat/Tank etc)

To solve the dilemma with derived classes (Car and Heli/Boat/Tank etc) we could add overloaded constructor commands:

00A5 CREATE_CAR Car.Create: Car
00A5 CREATE_BOAT Boat.Create(...): Boat
00A5 CREATE_TANK Tank.Create(...): Tank
00A5 CREATE_HELI Heli.Create(...): Heli

All four will compile to the same opcode 00A5 but the compiler will become aware of the correct type of the vehicle and the class name. Also the compiler could validate that the correct model id is provided to the constructor (Boat.Create(#INFERNUS...) would raise an error).

What do you think?

Originally posted by @x87 in sannybuilder/dev#136 (reply in thread)

command keywords editor

Currently in non-SCR mode, the keyword file of the corresponding game needs to be updated.

Need to provide the download of the keyword file on the online website.
In the SBL editor, when the command attribute is marked as is_keyword, it is hoped that the corresponding keyword can be automatically added to the keyword file after submission.
And the function of adding multiple keyword forms should be implemented in the online editor, for example, a command supports multiple keyword writing:

004E=end_thread  //old shorthand
004E=terminate_this_script //standard
004E=end_script //New shorthand

The main purpose is to retain the old keyword format, while the submitter can add a new, easy-to-write keyword format in the editor.

sync same commands

commands are same if they have the same extension, name, opcode, and number of params.

add property *download* to links

For not open the file in the browser.

<a ... >enums.txt</a>

indicate that it is a downloadable file:

<a ...  download>enums.txt</a>

ci: validate commands

pass/fail ci based on the result of validation

  • attr validation (combo)
  • param names (format)
  • #32
  • enums

Ambiguous command name: Zone.GetName

Found a duplicate command name:

class Zone
static GetName(x: float, y: float, z: float, var name: string) // ZONE
static GetName(x: float, y: float, z: float, var name: string) // INFO_ZONE

Build gh-pages does not display any errors. It would be nice to add some kind of scanner to the method names.

Originally posted by @wmysterio in sannybuilder/dev#136 (comment)

filter by supporting games

  • only:
    • supported in gta3
    • supported in vc
    • nop in gta3
    • nop in vc
    • unsupported in gta3
    • unsupported in vc
    • changed in gta3
    • changed in vc
  • except:
    • supported in gta3
    • supported in vc
    • nop in gta3
    • nop in vc
    • unsupported in gta3
    • unsupported in vc
    • changed in gta3
    • changed in vc

enhanced search

  • type: "exact search", "fuzzy search" and "regexp search"
    • exact search: wrap query in quotes, e.g. "get_player"
    • regexp search: wrap regexp in forward slashes e.g. /^player/
    • fuzzy search: default
  • scope: command name, description, examples, anywhere
  • share link (include search criteria in the query params)

https://library.sannybuilder.com/#/sa/?q=player&st=f&sc=n,e

authorized flow

  • oauth login via github
  • display edit feature to authorized users
  • create a pull request from the app
  • restore session
  • commit changes on demand to github

Support LCS and VCS

For LCS and VCS, we currently know very little command information. There are still many unknowns about their names. We don't need to add a complete command library in a short time. You only need to add these 2 modes, and you can use the online editor to add and modify commands, which can facilitate any submitter to improve and submit command information

add commands GET_PLATFORM

They were originally derived from new commands made by AlexB for the Android cleo library. As far as I know, the ioscleo library will add them in the next version, they help to detect script cross-platform compatibility. At first I thought I would update the CLEO library to add them. I'm updating too little, I wish CLEO Redux added them? Maybe? Also is it possible for cleo redux to be cross platform?

mutually exclusive attributes

  • is_nop => all except is_condition
  • is_unsupported => all
  • is_keyword => is_constructor, is_destructor, is_static, class, member

minor ui improvements

  • collapse filters and extensions list by default on mobile screen (collapsible directive)
  • switch modal/rail on window resize
  • lock save/submit button on click
  • param types dropdown in the editor is cut not reproducible
  • avoid scrolling of the commands list after save
  • command toolbar on the list overlaps long command name
  • more distinctive style for checkboxes
  • modal on mobile device is not positioned correctly when the page is scrolled not reproducible
  • changing opcode in address bar does nothing
  • add dropdown under user name with a link to the github profile and logout
  • change page title depending on route
  • prevent page reload when there are unsaved changes
  • if submitting a change leads to an error due to lack of permissions, library should suggest to the user to request access to the git repo
  • hotkeys to navigate between next/prev command (Ctrl+Arrow Up/Arrow Down), search (Ctrl+/)
  • button to copy class/keyword name/snippet (copy directive)
  • keep scroll position of the list when open/close right rail
  • scroll to the element in the list when opcode id in query params changes
  • game support text not displaying on mobile
  • selected filters should stay on page refresh
  • make a peek preview for enums in the types picker
  • highlight consecutive words in the description if they form a param name ( this value -> thisValue )

Provide CLEO Redux compatible syntax

In addition to SB classes and opcodes form, there should be another representation matching CLEO Redux (JavaScript) implementation.

Static methods and constructors start with a capital letter.
Instance methods start with a lowercase letter.

Self argument is used implicitly via this.
multiple outputs returned in an object

Download Option for SBL Formatted opcode.txt

An option to download a current SBL formatted opcode.txt file would be very useful for creating SBL formatted scripts. The format that I would find most useful is opcode notation. The opcode numbers help associate current and community command formats.

0256: is_player_playing [Player]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.