1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Dismiss Notice
  3. Dismiss Notice
  4. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  5. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Other Clockwork Constructors - Construct your own items, factions, and plugins! (RELEASED)

Discussion in 'Development' started by RJ, Mar 5, 2017.

  1. I think it may have been on my end, currently I have a dev server and the actual server. When the item was placed on the dev server it would not drop, but when on the actual server it was all good.
     
  2. RJ

    RJ no pay Honorable

    It's most definitely on your end then. I think the issue may be with regards to your item's model. Make sure that the .mdl file used by the item is within your server's files, or that you have the workshop addon properly loaded on your server with the model included in said addon.

    I tested out an item just now and it was working properly.
     
  3. RJ

    RJ no pay Honorable

    Here's a picture of the initial design for the the Blueprint Constructor:

    [​IMG]
     
    • Like Like x 2
    • Good Coder Good Coder x 1
    Last edited: Sep 20, 2017
  4. Mixed

    Mixed C16 Support Staff Staff Member Store Support Foreign Moderator Clockwork Customer Active Member

    Look good!
     
    • Like Like x 1
  5. RJ

    RJ no pay Honorable

    Last edited: Oct 5, 2017
  6. RJ

    RJ no pay Honorable

    Apologies for the lack of updates, I haven't been feeling motivated to work on this as of late. I'm aiming for a new update/release between Friday and Sunday.
     
    • Informative Informative x 1
  7. MiliViu

    MiliViu Staff Member Foreign Moderator Active Member

    This is awesome!!!
     
    • Like Like x 1
  8. RJ

    RJ no pay Honorable

    Thanks!
     
  9. RJ

    RJ no pay Honorable

    A small progress update, I added functionality for one of the buttons: https://i.gyazo.com/cc82f3cda6056f2f12510b8a433e6c8f.mp4

    This kind of functionality is actually a lot more tedious to implement than you'd think. Here's the button function's code for reference:
    Code:
        function addItemRequirement() {
            var divFormGroup = document.createElement('div');
            divFormGroup.className = 'form-group';
    
            var divColLg12 = document.createElement('div');
            divColLg12.className = 'col-lg-12';
            divFormGroup.appendChild(divColLg12);
    
            var divRow = document.createElement('div');
            divRow.className = 'row';
            divColLg12.appendChild(divRow);
    
            var divColMd41 = document.createElement('div');
            divColMd41.className = 'col-md-4';
            divRow.appendChild(divColMd41);
    
            var itemIdInput = document.createElement('input');
            itemIdInput.className = 'form-control';
            itemIdInput.name = 'blueprintItemId[]'; // TODO This may have to be changed
            itemIdInput.placeholder = 'item_id';
            itemIdInput.type = 'text';
            divColMd41.appendChild(itemIdInput);
    
    
    
            var divColMd42 = document.createElement('div');
            divColMd42.className = 'col-md-4';
            divRow.appendChild(divColMd42);
    
            var itemQuantityInput = document.createElement('input');
            itemQuantityInput.className = 'form-control';
            itemQuantityInput.name = 'blueprintItemQuantity[]'; // TODO This may have to be changed
            itemQuantityInput.placeholder = 'Quantity of item that will be required.';
            itemQuantityInput.type = 'number';
            divColMd42.appendChild(itemQuantityInput);
    
    
    
            var divColMd43 = document.createElement('div');
            divColMd43.className = 'col-md-4';
            divRow.appendChild(divColMd43);
    
            var btnGroupJustified = document.createElement('div');
            btnGroupJustified.className = 'btn-group btn-group-justified';
            btnGroupJustified.role = 'group';
            btnGroupJustified.setAttribute('aria-label', '...');
            divColMd43.appendChild(btnGroupJustified);
    
            var btnGroup1 = document.createElement('div');
            btnGroup1.className = 'btn-group';
            btnGroup1.role = 'group';
            btnGroupJustified.appendChild(btnGroup1);
    
            var itemQuantityIncrementButton = document.createElement('button');
            itemQuantityIncrementButton.className = 'btn btn-default';
            itemQuantityIncrementButton.type = 'button';
            itemQuantityIncrementButton.setAttribute('aria-hidden', 'true');
            btnGroup1.appendChild(itemQuantityIncrementButton);
    
            var incrementIcon = document.createElement('span');
            incrementIcon.className = 'glyphicon glyphicon-plus';
            itemQuantityIncrementButton.appendChild(incrementIcon);
    
            var btnGroup2 = document.createElement('div');
            btnGroup2.className = 'btn-group';
            btnGroup2.role = 'group';
            btnGroupJustified.appendChild(btnGroup2);
    
            var itemQuantityDecrementButton = document.createElement('button');
            itemQuantityDecrementButton.className = 'btn btn-default';
            itemQuantityDecrementButton.type = 'button';
            itemQuantityDecrementButton.setAttribute('aria-hidden', 'true');
            btnGroup2.appendChild(itemQuantityDecrementButton);
    
            var decrementIcon = document.createElement('span');
            decrementIcon.className = 'glyphicon glyphicon-minus';
            itemQuantityDecrementButton.appendChild(decrementIcon);
    
            var btnGroup3 = document.createElement('div');
            btnGroup3.className = 'btn-group';
            btnGroup3.role = 'group';
            btnGroupJustified.appendChild(btnGroup3);
    
            var itemSelectorButton = document.createElement('button');
            itemSelectorButton.className = 'btn btn-default';
            itemSelectorButton.type = 'button';
            itemSelectorButton.setAttribute('aria-hidden', 'true');
            btnGroup3.appendChild(itemSelectorButton);
    
            var itemSelectorIcon = document.createElement('span');
            itemSelectorIcon.className = 'glyphicon glyphicon-search';
            itemSelectorButton.appendChild(itemSelectorIcon);
    
            var btnGroup4 = document.createElement('div');
            btnGroup4.className = 'btn-group';
            btnGroup4.role = 'group';
            btnGroupJustified.appendChild(btnGroup4);
    
            var itemRequirementDeleteButton = document.createElement('button');
            itemRequirementDeleteButton.className = 'btn btn-danger';
            itemRequirementDeleteButton.type = 'button';
            itemRequirementDeleteButton.setAttribute('aria-hidden', 'true');
            btnGroup4.appendChild(itemRequirementDeleteButton);
    
            var deleteIcon = document.createElement('span');
            deleteIcon.className = 'glyphicon glyphicon-remove';
            itemRequirementDeleteButton.appendChild(deleteIcon);
    
    
    
            var parent = document.getElementById('itemRequirements');
            parent.appendChild(divFormGroup);
        }
    
    All of that is for adding a row of 2 inputs and 4 buttons.
     
    • Winner Winner x 1
    Last edited: Nov 18, 2017 at 7:22 PM
  10. duck

    duck Phant0m Honorable

    I feel like you should probably be using a front end framework. A project like this is the perfect fit for one. As you add more stuff, it's just going to be harder to maintain.
     
    • Agree Agree x 1
  11. RJ

    RJ no pay Honorable

    Yeah, I want to work with frameworks for my future websites. I've only made/am making a couple of major websites (this one included) and I'm using them as a means to learning the "basics". After which I plan to use frameworks which should make a lot of the current struggles a lot less painful.

    I feel like doings things the hard way at least once will give me an appreciation for all of the conveniences that frameworks can offer.
     
    • Like Like x 1
  12. RJ

    RJ no pay Honorable

    @duck I should've asked in my previous post, do you happen to know of any frameworks that would've been suitable to use with Clockwork Constructors? I think it'd be worthwhile to take a look if you had any in mind.
     
  13. duck

    duck Phant0m Honorable

    I don't have a particular one in mind. I barely even work on websites. Heard good things about Vue, though. The new Sandbox game uses it, too.
     
  14. RJ

    RJ no pay Honorable

    Aight, I'll take a look at Vue. Thanks!
     
  15. RJ

    RJ no pay Honorable

    More button functionality for the Blueprint Constructor: https://i.gyazo.com/2417774295679d21d58d9b43e871056b.mp4

    Next up is the increment/decrement buttons then the copy/paste from item requirements button. Depending on how complex the copy/paste will be, it may be removed entirely or pushed back to a later release after the Blueprint Constructor's initial release.
     
  16. RJ

    RJ no pay Honorable

    • Like Like x 1